block

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DelayExpireDuration = time.Minute * 15

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalLock

type LocalLock struct {
	// contains filtered or unexported fields
}

func (*LocalLock) IsExpired

func (l *LocalLock) IsExpired() bool

func (*LocalLock) Lock

func (l *LocalLock) Lock()

func (*LocalLock) TryLock

func (l *LocalLock) TryLock() bool

func (*LocalLock) Unlock

func (l *LocalLock) Unlock()

type LocalLockManager

type LocalLockManager struct {
	// contains filtered or unexported fields
}

func NewLocalLockManager

func NewLocalLockManager() *LocalLockManager

func (*LocalLockManager) Cleanup

func (llm *LocalLockManager) Cleanup()

func (*LocalLockManager) Len

func (llm *LocalLockManager) Len() int

func (*LocalLockManager) Lock

func (llm *LocalLockManager) Lock(key string, expiredTime time.Time)

func (*LocalLockManager) UnLock

func (llm *LocalLockManager) UnLock(key string)

Jump to

Keyboard shortcuts

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