redis

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisLocker

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

func New

func New(addrs []string) *RedisLocker

func (*RedisLocker) Close

func (r *RedisLocker) Close()

func (*RedisLocker) Delete

func (r *RedisLocker) Delete(lockKey *distlock.LockKey)

func (*RedisLocker) Exists

func (r *RedisLocker) Exists(lockKey *distlock.LockKey) bool

func (*RedisLocker) Get

func (r *RedisLocker) Get(lockKey *distlock.LockKey) string

func (*RedisLocker) Keep

func (r *RedisLocker) Keep(lockKey *distlock.LockKey, val string, expire time.Duration)

func (*RedisLocker) Set

func (r *RedisLocker) Set(lockKey *distlock.LockKey, val string, expire time.Duration)

func (*RedisLocker) SetIfAbsent

func (r *RedisLocker) SetIfAbsent(lockKey *distlock.LockKey, val string, expire time.Duration) bool

Jump to

Keyboard shortcuts

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