Documentation ¶
Index ¶
- func MustResolveCache(ctx context.Context, name string, config cache.Config) cache.Cache
- func RegisterCachePool(scheme string, opener cache.URLOpener)
- func ResolveCache(ctx context.Context, name string, config cache.Config) (cache.Cache, error)
- func SetCacheRegistryResolver(r CacheRegistryResolver)
- func SetStaticResolver(url string, opener cache.URLOpener)
- type CacheRegistry
- type CacheRegistryResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustResolveCache ¶
MustResolveCache forces the Config.DiscardFallback to true and returns ResolveCache without error If the cache opening fails, it returns a DiscardCache
func RegisterCachePool ¶
RegisterCachePool is a helper for cache pool registration
func ResolveCache ¶
ResolveCache looks up for manager in context and finds the corresponding cache
func SetCacheRegistryResolver ¶
func SetCacheRegistryResolver(r CacheRegistryResolver)
SetCacheRegistryResolver registers a resolver for finding CacheRegistry
func SetStaticResolver ¶
Types ¶
type CacheRegistry ¶
type CacheRegistry interface { RegisterCache(scheme string, opts ...controller.Option[*openurl.Pool[cache.Cache]]) GetCache(ctx context.Context, name string, resolutionData map[string]interface{}) (cache.Cache, error) }
CacheRegistry defines a subset of the Manager interface
type CacheRegistryResolver ¶
type CacheRegistryResolver func(ctx context.Context) (CacheRegistry, error)
Click to show internal directories.
Click to hide internal directories.