Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GracefulShutdown ¶ added in v1.0.6
GracefulShutdown accepts a server reference and triggers a graceful shutdown for it when either SIGINT or SIGTERM is received.
func Handler ¶
func Handler(w http.ResponseWriter, r *http.Request, h Handle)
Handler receives an HTTP request and response and a handler function It manages timeouts and prometheus metrics
func NewServer ¶ added in v1.0.6
NewServer returns an HTTP server ready to listen on the configured port and with logReq mixed in for logging.
func PromHTTPHandler ¶ added in v1.0.7
PromHTTPHandler to expose the metrics, invoked in the golang runtime
Types ¶
Click to show internal directories.
Click to hide internal directories.