Documentation ¶
Index ¶
Constants ¶
View Source
const ( B = 1 KB = 1024 * B MB = 1024 * KB GB = 1024 * MB )
View Source
const Key = "metrics"
Key is the key name of the metrics in the Gin context.
Variables ¶
This section is empty.
Functions ¶
func PrometheusHandler ¶
func PrometheusHandler() gin.HandlerFunc
PrometheusHandler serves the collected service information for Prometheus.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics stores instrument data.
func FromContext ¶
FromContext returns the metric associated with this context.
func (*Metrics) Handler ¶
func (m *Metrics) Handler() gin.HandlerFunc
Handler handles and parses, calculates the incoming http requests.
Click to show internal directories.
Click to hide internal directories.