Documentation
¶
Index ¶
- type PrometheusMetrics
- func (m *PrometheusMetrics) HTTPMiddleware() echo.MiddlewareFunc
- func (m *PrometheusMetrics) RecordCacheHit(cacheType, operation string)
- func (m *PrometheusMetrics) RecordCacheMiss(cacheType, operation string)
- func (m *PrometheusMetrics) SetActiveConnections(count int)
- func (m *PrometheusMetrics) SetDatabaseConnections(dbType, status string, count int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrometheusMetrics ¶
type PrometheusMetrics struct {
// contains filtered or unexported fields
}
PrometheusMetrics Prometheus指标收集器
func NewPrometheusMetrics ¶
func NewPrometheusMetrics() *PrometheusMetrics
NewPrometheusMetrics 创建Prometheus指标收集器
func (*PrometheusMetrics) HTTPMiddleware ¶
func (m *PrometheusMetrics) HTTPMiddleware() echo.MiddlewareFunc
HTTPMiddleware HTTP指标中间件
func (*PrometheusMetrics) RecordCacheHit ¶
func (m *PrometheusMetrics) RecordCacheHit(cacheType, operation string)
RecordCacheHit 记录缓存命中
func (*PrometheusMetrics) RecordCacheMiss ¶
func (m *PrometheusMetrics) RecordCacheMiss(cacheType, operation string)
RecordCacheMiss 记录缓存未命中
func (*PrometheusMetrics) SetActiveConnections ¶
func (m *PrometheusMetrics) SetActiveConnections(count int)
SetActiveConnections 设置活跃连接数
func (*PrometheusMetrics) SetDatabaseConnections ¶
func (m *PrometheusMetrics) SetDatabaseConnections(dbType, status string, count int)
SetDatabaseConnections 设置数据库连接数
Click to show internal directories.
Click to hide internal directories.