lockguard

package
v0.0.0-...-449fba1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LockGuard

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

func New

func New(client *redis.Client, key string, setters ...Setter) *LockGuard

func (*LockGuard) Lock

func (guard *LockGuard) Lock() bool

func (*LockGuard) UnLock

func (guard *LockGuard) UnLock()

type Setter

type Setter func(l *lock.Lock)

func WithExpiration

func WithExpiration(expiration time.Duration) Setter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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