server

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCertificate errors.ErrorCode = "CERTIFICATE_FAILURE"
)

Variables

This section is empty.

Functions

func GetHandleOpenapiSpec

func GetHandleOpenapiSpec(ctx context.Context) http.HandlerFunc

func GetOrGenerateRequestIDForGRPC

func GetOrGenerateRequestIDForGRPC(ctx context.Context) context.Context

GetOrGenerateRequestIDForGRPC returns a context with request id set from the context or from grpc metadata if it exists, otherwise it generates a new one.

func GetOrGenerateRequestIDForRequest

func GetOrGenerateRequestIDForRequest(req *http.Request) context.Context

GetOrGenerateRequestIDForRequest returns a context with request id set from the context or from metadata if it exists, otherwise it generates a new one.

func GetSslCredentials

func GetSslCredentials(ctx context.Context, certFile, keyFile string) (*x509.CertPool, *tls.Certificate, error)

func Migrate

func Migrate(ctx context.Context) error

Migrate runs all configured migrations

func RequestIDInterceptor

func RequestIDInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

RequestIDInterceptor is a server interceptor that sets the request id on the context for any incoming calls.

func Rollback

func Rollback(ctx context.Context) error

Rollback rolls back the last migration

func SeedProjects

func SeedProjects(ctx context.Context, projects []string) error

SeedProjects creates a set of given projects in the DB

func Serve

func Serve(ctx context.Context, pluginRegistry *plugins.Registry, additionalHandlers map[string]func(http.ResponseWriter, *http.Request)) error

Serve starts a server and blocks the calling goroutine

func SetMetricKeys

func SetMetricKeys(appConfig *runtimeIfaces.ApplicationConfig)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL