locker

package
v2.0.79 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocker

func NewLocker(prefix string, locker locker.ILocker) locker.ILocker

NewLocker 创建对应上下文分布式锁

Types

type Locker

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

func (*Locker) Mutex added in v2.0.34

func (e *Locker) Mutex(ctx context.Context, key string, options ...redsync.Option) *redsync.Mutex

Mutex 返回分布式互斥锁对象

func (*Locker) String

func (e *Locker) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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