redis

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mutex

type Mutex struct {
	redis.Cmdable
	// contains filtered or unexported fields
}

func New

func New(redis redis.Cmdable, opts ...Option) *Mutex

func (*Mutex) Lock

func (m *Mutex) Lock(ctx context.Context, name string) error

func (*Mutex) Unlock

func (m *Mutex) Unlock(ctx context.Context, name string) error

type Option

type Option func(*Mutex)

func WithExpired

func WithExpired(expired time.Duration) Option

Jump to

Keyboard shortcuts

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