locker

package
v2.0.16 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 3 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) Lock

func (e *Locker) Lock(key string, ttl int64, options ...redislock.Option) (*redislock.Mutex, error)

Lock 返回分布式锁对象

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