lock

package
v0.1.3 Latest Latest
Warning

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

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

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