Documentation
¶
Overview ¶
Package config provides cache configuration types for go-service.
This package contains configuration structs that are typically embedded into a larger service configuration and then consumed by the cache wiring in `github.com/alexfalkowski/go-service/v2/cache`.
Start with `Config`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Options contains implementation-specific configuration for the selected Kind.
//
// The interpretation of this map depends on the cache backend implementation.
Options map[string]any `yaml:"options,omitempty" json:"options,omitempty" toml:"options,omitempty"`
// Kind selects the cache backend implementation (for example "redis", "valkey", or "noop"),
// depending on which implementations are compiled/registered by the service.
Kind string `yaml:"kind,omitempty" json:"kind,omitempty" toml:"kind,omitempty"`
// Compressor selects the compression algorithm used for cached values (if supported by the implementation).
Compressor string `yaml:"compressor,omitempty" json:"compressor,omitempty" toml:"compressor,omitempty"`
// Encoder selects the value encoding used when storing objects in the cache (if applicable).
Encoder string `yaml:"encoder,omitempty" json:"encoder,omitempty" toml:"encoder,omitempty"`
}
Config configures the cache subsystem.
Click to show internal directories.
Click to hide internal directories.