Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Provide( NewHandler, NewLogger, )
Module is an fx compatible module.
Functions ¶
func NewLogger ¶
func NewLogger(params LoggerParams) promhttp.Logger
NewLogger creates a new, promhttp compliant logger instance.
Types ¶
type Handler ¶
Handler is a unique type intended to be the return type for the handler constructor. Consuming packages can use this interface the register the handler in a HTTP mux.
func NewHandler ¶
func NewHandler(params HandlerParams) Handler
NewHandler returns a new HTTP handler for Prometheus metrics.
type HandlerParams ¶
type HandlerParams struct { dig.In Gatherer prometheus.Gatherer Logger promhttp.Logger `optional:"true"` Opts promhttp.HandlerOpts `optional:"true"` }
HandlerParams provides a set of dependencies for a HTTP handler constructor.
Click to show internal directories.
Click to hide internal directories.