Documentation
¶
Overview ¶
Package prometheus 提供 HTTP 指标中间件与 metrics 路由注册能力。
该包默认不向 httpserver core 注入任何路由;调用方需要显式调用 Register 挂载 metrics 端点。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector 保存 HTTP 指标。
func (*Collector) Middleware ¶
func (c *Collector) Middleware() gin.HandlerFunc
Middleware 返回 collector 自身的指标中间件。
Click to show internal directories.
Click to hide internal directories.