locker

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locker

type Locker interface {
	// Lock 获取锁
	// key 锁名称
	// mark 锁的凭证,用于释放锁的唯一标志
	// expire 锁过期失效,以Millisecond为单位 1000 = 1s
	Lock(key string, expire int, mark string) error

	// UnLock 解锁
	// key 锁名称
	// mark 锁的凭证,用于释放锁的唯一标志
	UnLock(key string, mark string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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