|
|
@ -24,6 +24,7 @@ type (
|
|
|
|
Expire(key string, seconds int) error
|
|
|
|
Expire(key string, seconds int) error
|
|
|
|
Expireat(key string, expireTime int64) error
|
|
|
|
Expireat(key string, expireTime int64) error
|
|
|
|
Get(key string) (string, error)
|
|
|
|
Get(key string) (string, error)
|
|
|
|
|
|
|
|
GetSet(key, value string) (string, error)
|
|
|
|
Hdel(key, field string) (bool, error)
|
|
|
|
Hdel(key, field string) (bool, error)
|
|
|
|
Hexists(key, field string) (bool, error)
|
|
|
|
Hexists(key, field string) (bool, error)
|
|
|
|
Hget(key, field string) (string, error)
|
|
|
|
Hget(key, field string) (string, error)
|
|
|
@ -54,7 +55,6 @@ type (
|
|
|
|
Setex(key, value string, seconds int) error
|
|
|
|
Setex(key, value string, seconds int) error
|
|
|
|
Setnx(key, value string) (bool, error)
|
|
|
|
Setnx(key, value string) (bool, error)
|
|
|
|
SetnxEx(key, value string, seconds int) (bool, error)
|
|
|
|
SetnxEx(key, value string, seconds int) (bool, error)
|
|
|
|
Getset(key, value string) (string, error)
|
|
|
|
|
|
|
|
Sismember(key string, value interface{}) (bool, error)
|
|
|
|
Sismember(key string, value interface{}) (bool, error)
|
|
|
|
Smembers(key string) ([]string, error)
|
|
|
|
Smembers(key string) ([]string, error)
|
|
|
|
Spop(key string) (string, error)
|
|
|
|
Spop(key string) (string, error)
|
|
|
@ -460,7 +460,7 @@ func (cs clusterStore) SetnxEx(key, value string, seconds int) (bool, error) {
|
|
|
|
return node.SetnxEx(key, value, seconds)
|
|
|
|
return node.SetnxEx(key, value, seconds)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (cs clusterStore) Getset(key, value string) (string, error) {
|
|
|
|
func (cs clusterStore) GetSet(key, value string) (string, error) {
|
|
|
|
node, err := cs.getRedis(key)
|
|
|
|
node, err := cs.getRedis(key)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return "", err
|
|
|
|
return "", err
|
|
|
|