Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache interface { // Close the cache. Close(ctx context.Context) error // Remove a cached key. Remove(ctx context.Context, key string) error // Get a cached value. Get(ctx context.Context, key string, value any) error // Persist a value with key and TTL. Persist(ctx context.Context, key string, value any, ttl time.Duration) error }
Cache allows marshaling and compressing items to the cache.
type Config ¶
type Config struct { Options map[string]any `yaml:"options,omitempty" json:"options,omitempty" toml:"options,omitempty"` Kind string `yaml:"kind,omitempty" json:"kind,omitempty" toml:"kind,omitempty"` Compressor string `yaml:"compressor,omitempty" json:"compressor,omitempty" toml:"compressor,omitempty"` Encoder string `yaml:"encoder,omitempty" json:"encoder,omitempty" toml:"encoder,omitempty"` }
Config for cache.
Click to show internal directories.
Click to hide internal directories.