redislocker

package module
v0.0.0-...-4530441 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locker

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

Locker implements a distributed lock based on Redis (with a single instance).

func New

func New(client redis.UniversalClient) *Locker

func (*Locker) Lock

func (l *Locker) Lock(job string, ttl time.Duration) (bool, error)

Jump to

Keyboard shortcuts

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