redis

package
v0.0.0-...-455b646 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

type Lock struct {
	dlock.BaseLock
	// contains filtered or unexported fields
}

Distributed lock is Redis lock adapter.

func NewLock

func NewLock(p *redis.Pool, m string) *Lock

func (*Lock) LockAWaitInterval

func (lock *Lock) LockAWaitInterval(key string, expire time.Duration,
	wait time.Duration, interval time.Duration) (bool, error)

func (*Lock) Unlock

func (lock *Lock) Unlock() (bool, error)

Jump to

Keyboard shortcuts

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