package
0.7.0
Repository: https://github.com/yohobala/taurus_go.git
Documentation: pkg.go.dev

# Functions

ClearClient 用于清空redis客户端的连接池。 Example: redis.SetClient("test", &redis.Options{ Addr: "localhost:30001", Username: "", Password: "", DB: 15, }) defer redis.ClearClient() ExamplePath: taurus_go_demo/cache/redis/client_test.go - TestClearClient.
GetClient 用于从redis连接池中获取一个redis客户端,如果不存在,则返回nil。 Params: - clientName: redis客户端的名称,与`SetClient`中的`clientName`相同。 Returns: 0: redis客户端。 1: 错误信息。 Example: redis.SetClient("test", &redis.Options{ Addr: "localhost:6379", Username: "", Password: "", DB: 1, }) // highlight-start c, err := redis.GetClient("test") defer c.Close() // highlight-end if err != nil { fmt.Print(err.Error()) } ExamplePath: taurus_go_demo/cache/redis/client_test.go - TestGetClient ErrCodes: - Err_0300010001.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SetClient 用于添加一个redis客户端的配置。这个操作不会立即连接redis,只有在调用`GetClient`时才会连接。 Params: - clientName: redis客户端的名称。 - options: redis客户端的配置。 Example: redis.SetClient("test", &redis.Options{ Addr: "localhost:6379", Username: "", Password: "", DB: 1, }) ExamplePath: taurus_go_demo/cache/redis/client_test.go - TestSetClient.

# Constants

Add String类型键的添加操作。.
Del 所有类型的键的删除操作,会删除整个key,在如果对某个键添加了这个操作,则其他全部的操作都会忽略。.
Get String类型键的获取操作。.
HashType Hash类型的键。.
HDel Hash类型键删除单个键值对的操作。.
HGet Hash类型键获取单个键值对的操作。.
HGetAll Hash类型键获取所有键值对的操作。.
HMGet Hash类型键获取多个键值对的操作。.
HMSet Hash类型键添加多个键值对的操作,但是最后还是会调用HSet操作,所以输出会的Oper是HSet, 只是为了区分Add,和AddM方法.
HSet Hash类型键添加单个键值对的操作。.
HVals Hash类型键获取所有值的操作。.
SAdd Set类型键的添加操作。.
SetType Set类型的键。.
SMembers Set类型键的获取操作。.
SRem Set类型键的删除操作。.
StringType String类型的键。.

# Variables

Err_0300010001 redis客户端的配置不存在。 Verbs: 0: redis客户端的名称。.
Err_0300010002 redis客户端连接失败,用户名或密码认证失败。 Verbs: 0: redis客户端的名称。.
Err_0300010003 因为key不存在,所以没有结果返回。这有时候也不能被当做是错误,比如判断一个key是否存在, 就不应该把这个当做错误处理。 Verbs: 0: redis客户端的名称。 1: key的名称。.
Err_0300010004 对key执行不适合其值类型的操作。如果一个键是作为列表(list)存储的, 而你尝试对它执行针对字符串(string)类型的操作,就会出现这个错误 Verbs: 0: redis客户端的名称。 1: key的名称。.
Err_0300010005 redis客户端的追踪器类型错误,这个错误不应该出现。出现在内部新建tracker时, 对tracker类型进行断言出现错误.
Err_030001000x 未知的错误。 Verbs: 0: github.com/redis/go-redis产生的错误.

# Structs

No description provided by the author
Hash 追踪所有对Redis中Hash类型的事务管道操作,单次命令操作不会追踪,会在调用Save方法后执行。 Redis中Hash类型用于存储键值对的集合.
No description provided by the author
No description provided by the author
HashRes Hash类型操作的结果。 同一个键只会有一个HashRes。.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Set 追踪所有对Redis中Set类型的事务管道操作,单次命令操作不会追踪,会在调用Save方法后执行。 Redis中Set类型用于存储字符串的无序集合.
SetRes set类型操作的结果。 同一个键只会有一个SetRes。.
String 追踪所有对Redis中String类型的事务管道操作,单次命令操作不会追踪,会在调用Save方法后执行。 Redis中String类型用于存储单个字符串。.
No description provided by the author
No description provided by the author
StringRes String类型的键值对。 同一个键只会有一个StringRes。.
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author