lock

package
v0.0.0-...-f9738e6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

type Lock interface {
	Acquire(ctx context.Context) error
	Release(ctx context.Context) error
	AcquireFunc(ctx context.Context, cf func() error, do func() error) error
}

func New

func New(client *redis.Client, key string, opts ...Option) Lock

type Option

type Option func(*option)

func WithTimeout

func WithTimeout(timeout time.Duration) Option

func WithValue

func WithValue(value string) Option

Jump to

Keyboard shortcuts

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