redis

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheKey

func CacheKey(key string) string

CacheKey 构建缓存key

func Close

func Close()

func MainKey

func MainKey(key string) string

MainKey 构建安全key

Types

type Client

type Client interface {
	redis.UniversalClient
	Close() error
	Ping(ctx context.Context) *redis.StatusCmd
}

Client redis客户端

func CacheClient

func CacheClient() Client

CacheClient 获取缓存redis实例

func Initialize

func Initialize(cfg *config.Config) (Client, error)

func MainClient

func MainClient() Client

MainClient 获取主redis实例

Jump to

Keyboard shortcuts

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