server

package
v1.1.131 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 46 Imported by: 2

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func GetHandleOpenapiSpec added in v0.6.118

func GetHandleOpenapiSpec(ctx context.Context) http.HandlerFunc

func GetOrGenerateRequestIDForGRPC added in v1.1.113

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 added in v1.1.113

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 added in v0.6.118

func Migrate(ctx context.Context) error

Migrate runs all configured migrations

func RequestIDInterceptor added in v1.1.113

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 added in v0.6.118

func Rollback(ctx context.Context) error

Rollback rolls back the last migration

func SeedProjects added in v0.6.118

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

SeedProjects creates a set of given projects in the DB

func Serve added in v0.6.118

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 added in v1.1.10

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