Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector collects statistics from a redis client. It implements the prometheus.Collector interface.
func NewCollector ¶
func NewCollector(namespace, subsystem string, getter StatGetter) *Collector
NewCollector returns a new Collector based on the provided StatGetter. The given namespace and subsystem are used to build the fully qualified metric name, i.e. "{namespace}_{subsystem}_{metric}". The provided metrics are:
- pool_hit_total
- pool_miss_total
- pool_timeout_total
- pool_conn_total_current
- pool_conn_idle_current
- pool_conn_stale_total
func (*Collector) Collect ¶
func (s *Collector) Collect(metrics chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (*Collector) Describe ¶
func (s *Collector) Describe(descs chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
type StatGetter ¶
type StatGetter interface {
PoolStats() *redis.PoolStats
}
StatGetter provides a method to get pool statistics.
Click to show internal directories.
Click to hide internal directories.