Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Opt ¶
Opt is the signature of server configuration functions
func WithHandlers ¶
func WithHandlers(routes map[string]http.HandlerFunc, isProd bool) Opt
WithHandlers loads HTTP handlers on endpoints
type Server ¶
Server w/ embedded *http.Server, *mux.Router, zerolog.Logger instances. Manages configurations, starting, stopping and routing of server instances
func (*Server) AcceptConnections ¶
AcceptConnections listens on the configured address and ports for http traffic. Simultaneously listens for incoming os signals, will return on either a server error or a shutdown signal
func (*Server) GetLivenessCheck ¶
GetLivenessCheck retrieves the liveness check interval from systemd if running in production mode (i.e., with systemd), else the interval specified in the configuration
func (*Server) LivenessCheck ¶
LivenessCheck retrieves home page to verify the liveness of the server, then notifies the systemd daemon to pass the check. systemd will restart server on failed health check