locker

package
v0.0.0-...-d3f65ed Latest Latest
Warning

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

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

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