metercacher

package
v1.9.4-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: BSD-3-Clause Imports: 6 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T comparable, K any](
	namespace string,
	registerer prometheus.Registerer,
	cache cache.Cacher[T, K],
) (cache.Cacher[T, K], error)

Types

type Cache

type Cache[T comparable, K any] struct {
	cache.Cacher[T, K]
	// contains filtered or unexported fields
}

func (*Cache[T, K]) Get

func (c *Cache[T, K]) Get(key T) (K, bool)

func (*Cache) Initialize

func (m *Cache) Initialize(
	namespace string,
	reg prometheus.Registerer,
) error

func (*Cache[T, K]) Put

func (c *Cache[T, K]) Put(key T, value K)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL