Documentation ¶
Index ¶
- func Connect(addr string, options ...Option)
- func DelEx(ctx context.Context, key string) (err error)
- func Get[T RedisValueTypes](ctx context.Context, key string) (val T, isNotExist bool, err error)
- func GetKeyEventExpired(db int) string
- func HashDel(ctx context.Context, key string, val string) (err error)
- func HashGetAll(ctx context.Context, key string) (result map[string]string, isNotExist bool, err error)
- func HashGetString(ctx context.Context, key, field string) (result string, isNotExist bool, err error)
- func HashSet(ctx context.Context, key string, val map[string]any, expiration time.Duration) (err error)
- func HashUpdate(ctx context.Context, key string, val ...any) (err error)
- func SetEx(ctx context.Context, key string, val any, exp time.Duration) (err error)
- func Subscribe(ctx context.Context, key string) (subscribe *redis.PubSub)
- type Option
- type Options
- type RedisValueTypes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKeyEventExpired ¶
GetKeyEventExpired 需要修改redis.conf配置项,启用notify-keyspace-events = "EX"
func HashGetAll ¶
func HashGetString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.