Documentation ¶
Overview ¶
Package clredis provides reusable components for using Redis
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( opts *redis.UniversalOptions, _ *zap.Logger, tp trace.TracerProvider, mtr metric.MeterProvider, ) (redis.UniversalClient, error)
New inits a universal client and instruments it if available.
func NewOptions ¶
NewOptions parses our environment config into options for the Redis client.
Types ¶
type Config ¶
type Config struct { // Node addresses provide to the cluster client Addrs []string `env:"ADDRS" envDefault:"localhost:6379"` // Username for authenticated configuration Username string `env:"USERNAME"` // Password for authenticated configuration Password string `env:"PASSWORD"` // Enable tls EnableTLS bool `env:"ENABLE_TLS" envDefault:"false"` // Setting this enables TLS connections TLSServerName string `env:"TLS_SERVER_NAME"` // ClientName allows the application to indicate its name so connections can be more easily debugged ClientName string `env:"CLIENT_NAME" envDefault:"unknown"` }
Config configures Redis through the environment.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger logger implements: https://github.com/go-redis/redis/blob/86258a11a93291b817f420fff47e79bd22fcb4ca/redis.go
Click to show internal directories.
Click to hide internal directories.