lock

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrClientNil 客户端nil
	ErrClientNil = errors.New("client is nil")
	// ErrUnLock 解锁失败
	ErrUnLock = errors.New("unlock fail")
)

Functions

This section is empty.

Types

type Locker

type Locker interface {
	Lock(ctx context.Context, key string, random interface{}, duration time.Duration, try int) (ok bool, err error)
	Unlock(ctx context.Context, key string, random interface{}) (err error)
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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