Documentation ¶
Index ¶
- Constants
- func GetHandleOpenapiSpec(ctx context.Context) http.HandlerFunc
- func GetOrGenerateRequestIDForGRPC(ctx context.Context) context.Context
- func GetOrGenerateRequestIDForRequest(req *http.Request) context.Context
- func GetSslCredentials(ctx context.Context, certFile, keyFile string) (*x509.CertPool, *tls.Certificate, error)
- func Migrate(ctx context.Context) error
- func RequestIDInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (interface{}, error)
- func Rollback(ctx context.Context) error
- func SeedProjects(ctx context.Context, projects []string) error
- func Serve(ctx context.Context, pluginRegistry *plugins.Registry, ...) error
- func SetMetricKeys(appConfig *runtimeIfaces.ApplicationConfig)
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 ¶
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 ¶
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 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 SeedProjects ¶
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.
Click to show internal directories.
Click to hide internal directories.