Documentation ¶
Index ¶
- Variables
- type Metrics
- type TTLMap
- func (m *TTLMap) Add(k string, v interface{}, expiresAt time.Time, invincible bool)
- func (m *TTLMap) Delete(k string)
- func (m *TTLMap) EnableMetrics(namespace string)
- func (m *TTLMap) Get(k string) (interface{}, time.Time, error)
- func (m *TTLMap) Len() int
- func (m *TTLMap) OnItemAdded(f func(string, interface{}, time.Time))
- func (m *TTLMap) OnItemDeleted(f func(string, interface{}, time.Time))
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OperationADD = "add" OperationGET = "get" OperationDEL = "del" OperationEVICT = "evict" )
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct { Operations *prometheus.CounterVec Hits prometheus.Counter Misses prometheus.Counter Len prometheus.Gauge }
func NewMetrics ¶
func (Metrics) ObserveHit ¶
func (m Metrics) ObserveHit()
func (Metrics) ObserveLen ¶
func (Metrics) ObserveMiss ¶
func (m Metrics) ObserveMiss()
func (Metrics) ObserveOperations ¶
Click to show internal directories.
Click to hide internal directories.