Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRedisLocker ¶
func NewRedisLocker( cfg *Config, logger logging.Logger, tracerProvider tracing.TracerProvider, metricsProvider metrics.Provider, cb circuitbreaking.CircuitBreaker, ) (distributedlock.Locker, error)
NewRedisLocker constructs a new Redis-backed distributedlock.Locker.
Types ¶
type Config ¶
type Config struct {
Username string `env:"USERNAME" json:"username"`
Password string `env:"PASSWORD" json:"password,omitempty"`
KeyPrefix string `env:"KEY_PREFIX" envDefault:"lock:" json:"keyPrefix"`
Addresses []string `env:"ADDRESSES" json:"addresses"`
}
Config configures a Redis-backed distributed locker.
Click to show internal directories.
Click to hide internal directories.