lib

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: MIT Imports: 3 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 {
	Obtain(name string, expire time.Duration) Mutex
}

func NewRedisLocker

func NewRedisLocker(redis *redis.Client) Locker

type Mutex

type Mutex interface {
	Lock() (bool, error)
	Unlock() error
}

type RedisLock

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

func (*RedisLock) Obtain

func (rl *RedisLock) Obtain(name string, expire time.Duration) Mutex

Jump to

Keyboard shortcuts

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