redis

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 4 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(cli *redis.Client, ttl time.Duration) *RedisLock

func (*RedisLock) Lock

func (r *RedisLock) Lock(ctx context.Context, key string) (keyLock interface{}, err error)

func (*RedisLock) UnLock

func (r *RedisLock) UnLock(ctx context.Context, keyLock interface{}) error

Jump to

Keyboard shortcuts

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