redis

package
v1.9.7 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRedisLockFailed = errors.New("redis lock: failed to acquire lock")
)

Functions

This section is empty.

Types

type Lock

type Lock struct {
	// contains filtered or unexported fields
}

func New

func New(cnf *config.Config, addrs []string, db, retries int) *Lock

func (*Lock) Lock

func (r *Lock) Lock(key string, value int64) error

func (*Lock) LockWithRetries

func (r *Lock) LockWithRetries(key string, value int64) error

try lock with retries

Jump to

Keyboard shortcuts

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