redis

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL