Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerWithConfig ¶
func LoggerWithConfig(config LoggerConfig) echo.MiddlewareFunc
Types ¶
type LoggerConfig ¶
type LoggerConfig struct { Skipper middleware.Skipper // BlackListEndpoint is the list of endpoint that you don't want to log with the info level BlackListEndpoint []string }
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics provides a way to monitor an API with a middleware to use
func NewMetrics ¶
func (*Metrics) Collect ¶
func (m *Metrics) Collect(ch chan<- prometheus.Metric)
func (*Metrics) Describe ¶
func (m *Metrics) Describe(ch chan<- *prometheus.Desc)
func (*Metrics) ProcessHTTPRequest ¶
func (m *Metrics) ProcessHTTPRequest(next echo.HandlerFunc) echo.HandlerFunc
ProcessHTTPRequest is an echo middleware. It will intercept all responses. It will increase the metrics that count the number of HTTP request and calculate the time took to respond.
Click to show internal directories.
Click to hide internal directories.