rediscli

package
v0.0.0-...-0350bc7 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBasicType

func IsBasicType(v any) bool

Types

type RedisClient

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

func NewRedisClient

func NewRedisClient(cli redis.UniversalClient, conf *RedisClientConfig) *RedisClient

func (*RedisClient) Get

func (cli *RedisClient) Get(c context.Context, key string, resp any) error

func (*RedisClient) Set

func (cli *RedisClient) Set(c context.Context, key string, value any, expire time.Duration) error

type RedisClientConfig

type RedisClientConfig struct {
	Encoder func(c context.Context, key string, value any) (any, error)
	Decoder func(c context.Context, key string, cmd *redis.StringCmd, resp any) error
}

Jump to

Keyboard shortcuts

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