package
2.4.3
Repository: https://github.com/frelon/loki.git
Documentation: pkg.go.dev

# Functions

ExtractCacheGenNumbersFromHeaders gets the cache gen from the context.
HashKey hashes key into something you can store in memcached.
InjectCacheGenNumber returns a derived context containing the cache gen.
Instrument returns an instrumented cache.
IsEmptyTieredCache is used to determine whether the current Cache is implemented by an empty tiered.
IsMemcacheSet returns whether a non empty Memcache config is set or not, based on the configured host or addresses.
IsRedisSet returns whether a non empty Redis config is set or not, based on the configured endpoint.
New creates a new Cache using Config.
NewBackground returns a new Cache that does stores on background goroutines.
NewCacheGenNumMiddleware creates a new GenNumMiddleware.
NewFifoCache returns a new initialised FifoCache of size.
NewMemcached makes a new Memcached.
NewMemcachedClient creates a new MemcacheClient that gets its server list from SRV and updates the server list on a regular basis.
NewMockCache makes a new MockCache.
NewNoopCache returns a no-op cache.
NewRedisCache creates a new RedisCache.
NewRedisClient creates Redis client.
NewSnappy makes a new snappy encoding cache wrapper.
NewTiered makes a new tiered cache.
StopOnce wraps a Cache and ensures its only stopped once.
StringToBytes converts string to byte slice.

# Structs

BackgroundConfig is config for a Background Cache.
Config for building Caches.
FifoCache is a simple string -> interface{} cache which uses a fifo slide to manage evictions.
FifoCacheConfig holds config for the FifoCache.
GenNumMiddleware adds gen number to keys from context.
Memcached type caches chunks in memcached.
MemcachedClientConfig defines how a MemcachedClient should be constructed.
MemcachedConfig is config to make a Memcached.
MemcachedJumpHashSelector implements the memcache.ServerSelector interface.
RedisCache type caches chunks in redis.
No description provided by the author
RedisConfig defines how a RedisCache should be constructed.

# Interfaces

Cache byte arrays by key.
MemcachedClient interface exists for mocking memcacheClient.