Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRedisCache ¶
func NewRedisCache[T any](cfg *Config, expiration time.Duration, logger logging.Logger, tracerProvider tracing.TracerProvider, metricsProvider metrics.Provider, cb circuitbreaking.CircuitBreaker) (cache.Cache[T], error)
NewRedisCache builds a new redis-backed cache.
Types ¶
type Config ¶
type Config struct {
Username string `env:"USERNAME" json:"username"`
Password string `env:"PASSWORD" json:"password,omitempty"`
QueueAddresses []string `env:"QUEUE_ADDRESSES" json:"queueAddresses"`
Cluster bool `env:"CLUSTER" json:"cluster"`
}
Config configures a Redis-backed consumer.
Click to show internal directories.
Click to hide internal directories.