redlock

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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
}

func NewLocker

func NewLocker(client redis.UniversalClient, key, value string) *Locker

func (*Locker) ExtendLock

func (l *Locker) ExtendLock(ctx context.Context, extension time.Duration) error

func (*Locker) Lock

func (l *Locker) Lock(ctx context.Context, timeout time.Duration) error

func (*Locker) Unlock

func (l *Locker) Unlock(ctx context.Context) error

func (*Locker) WaitLock

func (l *Locker) WaitLock(ctx context.Context, lockTimeout, waitTimeout time.Duration) error

Jump to

Keyboard shortcuts

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