Documentation ¶ Index ¶ func NewRedisClient(cfg *Config) *redis.Client type Config type Lock func (rl *Lock) Lock(key, value string, timeoutMs int) (bool, error) func (rl *Lock) Unlock(key, value string) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewRedisClient ¶ func NewRedisClient(cfg *Config) *redis.Client Types ¶ type Config ¶ type Config struct { Addr string Password string DB int } type Lock ¶ type Lock struct { RedisClient *redis.Client } func (*Lock) Lock ¶ func (rl *Lock) Lock(key, value string, timeoutMs int) (bool, error) func (*Lock) Unlock ¶ func (rl *Lock) Unlock(key, value string) Source Files ¶ View all Source files lock.goredis.go Click to show internal directories. Click to hide internal directories.