Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheCollector ¶
type CacheCollector[K comparable, V any] struct { // contains filtered or unexported fields }
CacheCollector implements a prometheus.Collector for ttlcache.Cache.
func NewCacheCollector ¶
func NewCacheCollector[K comparable, V any](cache *ttlcache.Cache[K, V], prefix string, variableLabels []string, constLabels prometheus.Labels) *CacheCollector[K, V]
NewCacheCollector creates a new CacheCollector for the specified cache. All metrics use the supplied variable and constant labels.
func (*CacheCollector[K, V]) Collect ¶
func (collector *CacheCollector[K, V]) Collect(ch chan<- prometheus.Metric)
Collect implements the Collect method of a prometheus.Collector.
func (*CacheCollector[K, V]) Describe ¶
func (collector *CacheCollector[K, V]) Describe(ch chan<- *prometheus.Desc)
Describe implements the Describe method of a prometheus.Collector.
Click to show internal directories.
Click to hide internal directories.