redis

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisLocker

func NewRedisLocker(
	host string, port uint, password string, db int,
	poolSize, minIdleConns int, dialTimeout, timeout, flushTime time.Duration,
) (lock.Locker, error)

Types

type RedisLocker

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

func (*RedisLocker) Delay

func (locker *RedisLocker) Delay(ctx context.Context, key string) (bool, error)

func (*RedisLocker) Lock

func (locker *RedisLocker) Lock(ctx context.Context, key string) (bool, error)

func (*RedisLocker) LockWithAutoDelay

func (locker *RedisLocker) LockWithAutoDelay(ctx context.Context, key string) (bool, error)

func (*RedisLocker) UnLock

func (locker *RedisLocker) UnLock(ctx context.Context, key string) error

Jump to

Keyboard shortcuts

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