distlock

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLockNotObtained = redislock.ErrNotObtained

Functions

This section is empty.

Types

type Locker

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

func New

func New(redisClient redis.UniversalClient) *Locker

func (*Locker) TryWithLock

func (l *Locker) TryWithLock(ctx context.Context, key string, ttl time.Duration, handler func() error) error

func (*Locker) WithLock

func (l *Locker) WithLock(ctx context.Context, key string, ttl time.Duration, handler func() error) error

Jump to

Keyboard shortcuts

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