Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct { Insertion prometheus.Counter Eviction *prometheus.CounterVec Hit prometheus.Counter Miss prometheus.Counter Length prometheus.Gauge Weight prometheus.Gauge // settings // SettingsCapacity prometheus.Gauge SettingsTTL prometheus.Gauge SettingsJitterLambda prometheus.Gauge SettingsJitterUpperBound prometheus.Gauge SettingsStale prometheus.Gauge // SettingsMissingCapacity prometheus.Gauge SettingsMissingTTL prometheus.Gauge SettingsMissingStale prometheus.Gauge }
@TODO: Should be simple atomic counters and gauges. @TODO: If metrics are disabled, no need to collect them (use a no-op implementation). @TODO: If prometheus metrics are enabled, collect them in a separate goroutine. @TODO: collect revalidation count+delay @TODO: add a label for the cache name @TODO: add comment to metric declaration @TODO: weight should be diplicated in order to include *item[V] weight
Click to show internal directories.
Click to hide internal directories.