redis

package
v1.216.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetObjectByKey added in v1.173.0

func GetObjectByKey[T any](redisClient *ClientWithHelpers, key string, object T) *T

Types

type ClientWithHelpers

type ClientWithHelpers struct {
	Client    *redis.Client
	Available bool
}

func GetRedisClient added in v1.173.0

func GetRedisClient(isDebug bool) *ClientWithHelpers

func NewClient

func NewClient(addr string) *ClientWithHelpers

func (ClientWithHelpers) DeleteByKey

func (r ClientWithHelpers) DeleteByKey(key string) error

func (ClientWithHelpers) DeleteByKeyPattern

func (r ClientWithHelpers) DeleteByKeyPattern(pattern string)

func (ClientWithHelpers) GetValueByKey

func (r ClientWithHelpers) GetValueByKey(key string) string

func (ClientWithHelpers) IsConnected

func (r ClientWithHelpers) IsConnected() bool

func (ClientWithHelpers) RateLimit

func (r ClientWithHelpers) RateLimit(key string, limitFn func(int) redis_rate.Limit, limit int) (bool, error)

func (ClientWithHelpers) SetObjectByKey

func (r ClientWithHelpers) SetObjectByKey(key string, object interface{})

func (ClientWithHelpers) SetObjectByKeyIndefinitely

func (r ClientWithHelpers) SetObjectByKeyIndefinitely(key string, object interface{})

func (ClientWithHelpers) SetObjectByKeyWithExpiry

func (r ClientWithHelpers) SetObjectByKeyWithExpiry(key string, object interface{}, expiration time.Duration)

Jump to

Keyboard shortcuts

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