redis

package
v0.0.0-...-a3cb3ec Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 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 RedisLock

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

func NewRedisLock

func NewRedisLock(rdb *redis.Client, key, value string, expiration time.Duration) *RedisLock

func (*RedisLock) Lock

func (l *RedisLock) Lock(ctx context.Context) bool

func (*RedisLock) UnLock

func (l *RedisLock) UnLock(ctx context.Context, key, value string) bool

Jump to

Keyboard shortcuts

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