Documentation
¶
Overview ¶
Package app wires the process lifecycle around the HTTP API server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App runs a Server through a signal-aware serve/shutdown cycle.
type Server ¶
type Server interface {
// Start begins serving and blocks until the server stops.
Start(context.Context) error
// Shutdown gracefully stops the server, honoring the context
// deadline.
Shutdown(context.Context) error
}
Server is the lifecycle contract the app runs: start serving until the context ends, then shut down gracefully. Satisfied by [api.Server]; defined here so the lifecycle wiring does not depend on the HTTP package.
Click to show internal directories.
Click to hide internal directories.