Documentation ¶
Index ¶
Constants ¶
View Source
const ( CtxKeyCmd = contextKey("command") CtxKeyHttpServerRunner = contextKey("HttpServerController") CtxKeyBuildInfo = contextKey("BuildInfo") CtxKeyServerConfig = contextKey("ServerConfig") CtxKeyTestConfig = contextKey("TestConfig") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpServicer ¶
type HttpServicer interface { // Name returns the name of the service Name() string // Prepare prepares the service for running, for example by registering HTTP routes, allocating resources, checking network dependencies, etc. Prepare(ctx context.Context, serverConfig configs.ServerConfiger, testConfig configs.TestConfiger, httpRouter chi.Router, tr trace.Tracer) error // Run runs the service. Called after all services have been prepared. Start(ctx context.Context) error // Stop stops the service. Called when the application is shutting down. It should free resources, close connections, etc. Stop(ctx context.Context) error }
HttpServicer is the interface for HTTP services
Click to show internal directories.
Click to hide internal directories.