redis

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

type Redis struct {
	Client        *redis.Client
	Options       redis.Options
	VarNamePrefix string
}

func Init added in v1.7.0

func Init(Addr string, Password string, DB int, varNamePrefix string) (m *Redis)

func (*Redis) Close added in v1.7.0

func (m *Redis) Close() error

func (*Redis) DoGet

func (m *Redis) DoGet(args ...any) (any, error)

获取变量 Do 模式

func (*Redis) DoSet

func (m *Redis) DoSet(args ...any) error

设置变量 Do 模式

func (*Redis) Get

func (m *Redis) Get(name string) (string, error)

获取变量

func (*Redis) InitRedisClient

func (m *Redis) InitRedisClient()

初始化 redis 客户端

func (*Redis) Set

func (m *Redis) Set(name string, value interface{}, expiration int64) error

设置变量

Jump to

Keyboard shortcuts

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