Documentation ¶
Overview ¶
Copyright 2017 gopool Author. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
redis client
Index ¶
- Constants
- type RedisCli
- func (rc *RedisCli) Del(key string) (err error)
- func (rc *RedisCli) Exists(key string) (ex bool, err error)
- func (rc *RedisCli) Expire(key string, expiresecond int) (err error)
- func (rc *RedisCli) FlushAll() (err error)
- func (rc *RedisCli) Get(key string) (reply string, err error)
- func (rc *RedisCli) GetConnAllCount() int
- func (rc *RedisCli) GetConnCount() map[string]int
- func (rc *RedisCli) GetHealthy() map[string]bool
- func (rc *RedisCli) GetUnhealthyNodeCount() (int, []string)
- func (rc *RedisCli) HDel(key string, fields ...interface{}) (reply int64, err error)
- func (rc *RedisCli) HGet(key, subkey string) (reply string, err error)
- func (rc *RedisCli) HGetall(key string) (reply map[string]string, err error)
- func (rc *RedisCli) HKeys(key string) (replys []string, err error)
- func (rc *RedisCli) HMGet(key string, fields []interface{}) (replys []string, err error)
- func (rc *RedisCli) HMSet(key string, values []interface{}) (err error)
- func (rc *RedisCli) HSet(key, subkey, value string) (err error)
- func (rc *RedisCli) Incr(key string) (reply int, err error)
- func (rc *RedisCli) IncrBy(key string, value int) (reply int, err error)
- func (rc *RedisCli) IncrByfloat(key string, value float64) (reply string, err error)
- func (rc *RedisCli) MGet(keys ...interface{}) (replys []string, err error)
- func (rc *RedisCli) SAdd(key string, args ...interface{}) (err error)
- func (rc *RedisCli) SCard(key string) (reply int, err error)
- func (rc *RedisCli) SMembers(key string) (reply []string, err error)
- func (rc *RedisCli) SPop(key string) (reply string, err error)
- func (rc *RedisCli) SRem(key string, args ...interface{}) (err error)
- func (rc *RedisCli) SUnionstore(dkey string, args ...interface{}) (count int64, err error)
- func (rc *RedisCli) Set(args ...interface{}) (err error)
- func (rc *RedisCli) Setnx(key, value string) (err error)
- func (rc *RedisCli) TTL(key string) (reply int, err error)
- func (rc *RedisCli) ZAdd(key string, ttl int64, args ...interface{}) (err error)
- func (rc *RedisCli) ZCount(key string, min, max int64) (reply int64, err error)
- func (rc *RedisCli) ZRange(key string, start, stop int) (reply []string, err error)
- func (rc *RedisCli) ZRangeByScore(key string, min, max int, minopen, maxopen bool) (reply []string, err error)
- func (rc *RedisCli) ZRangeByScoreWithScores(key string, min, max int, minopen, maxopen bool) (reply map[string]string, err error)
- func (rc *RedisCli) ZRangeWithScores(key string, start, stop int) (reply map[string]string, err error)
- func (rc *RedisCli) ZRem(keys ...interface{}) (reply int64, err error)
- func (rc *RedisCli) ZRemRangeByScore(key string, min, max int64) (reply int64, err error)
- func (rc *RedisCli) ZScore(key, val string) (score int64, err error)
- type Req
Constants ¶
View Source
const ( DEFAULT_ADDR = "127.0.0.1:6379" DEFAULT_SIZE = 100 DEFAULT_CONNTIMEOUT = 100 DEFAULT_READTIMEOUT = 50 DEFAULT_WRITETIMEOUT = 50 DEFAULT_MAXQPS = 100000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisCli ¶
type RedisCli struct {
// contains filtered or unexported fields
}
func NewRedisCli ¶
func (*RedisCli) GetConnAllCount ¶
func (*RedisCli) GetConnCount ¶
func (*RedisCli) GetHealthy ¶
func (*RedisCli) GetUnhealthyNodeCount ¶
func (*RedisCli) IncrByfloat ¶
func (*RedisCli) SUnionstore ¶
func (*RedisCli) ZRangeByScore ¶
func (*RedisCli) ZRangeByScoreWithScores ¶
func (*RedisCli) ZRangeWithScores ¶
func (*RedisCli) ZRemRangeByScore ¶
type Req ¶
type Req struct { Addrs []string Size int ConnTimeOut int64 ReadTimeOut int64 WriteTimeOut int64 MaxQps int64 }
func (*Req) GetConnTimeOut ¶
func (*Req) GetReadTimeOut ¶
func (*Req) GetWriteTimeOut ¶
Click to show internal directories.
Click to hide internal directories.