redisx

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Locker *redislock.Client
)

Functions

func Config

func Config(v *viper.Viper)

func GetClient

func GetClient(name string) *redis.Client

func Key

func Key(client *redis.Client, keys ...string) string

func NewLocker

func NewLocker(client *redis.Client) *redislock.Client

Types

type ClientWrapper

type ClientWrapper struct {
	*redis.Client
}

func Get

func Get(name string) *ClientWrapper

func (*ClientWrapper) Key

func (t *ClientWrapper) Key(keys ...string) string

func (*ClientWrapper) Obtain

func (t *ClientWrapper) Obtain(ctx context.Context, key string, ttl time.Duration, opt *redislock.Options) (*redislock.Lock, error)

Jump to

Keyboard shortcuts

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