Documentation ¶
Index ¶
- Constants
- type ClusterCacheImpl
- func (impl *ClusterCacheImpl) Del(key string) error
- func (impl *ClusterCacheImpl) Dels(args []string) error
- func (impl *ClusterCacheImpl) Exists(key string) (bool, error)
- func (impl *ClusterCacheImpl) Get(key string) ([]byte, error)
- func (impl *ClusterCacheImpl) HDel(key string, fields ...[]byte) (int64, error)
- func (impl *ClusterCacheImpl) HExists(key string, field []byte) (bool, error)
- func (impl *ClusterCacheImpl) HGetAll(key string) ([][]byte, error)
- func (impl *ClusterCacheImpl) HMGet(key string, fields ...[]byte) ([][]byte, error)
- func (impl *ClusterCacheImpl) HMSet(key string, ttl int64, args ...[]byte) error
- func (impl *ClusterCacheImpl) HVals(key string) ([][]byte, error)
- func (impl *ClusterCacheImpl) Initialize(cfg interface{})
- func (impl *ClusterCacheImpl) Keys(keyFormat string) ([][]byte, error)
- func (impl *ClusterCacheImpl) SAdd(key string, ttl int64, members ...[]byte) error
- func (impl *ClusterCacheImpl) SCard(key string) (int64, error)
- func (impl *ClusterCacheImpl) SIsMember(key string, member []byte) (bool, error)
- func (impl *ClusterCacheImpl) SMembers(key string) ([][]byte, error)
- func (impl *ClusterCacheImpl) SRem(key string, members ...[]byte) (int64, error)
- func (impl *ClusterCacheImpl) Set(key string, value []byte, ttl int64) error
- func (impl *ClusterCacheImpl) ZAdd(key string, ttl int64, args ...[]byte) error
- func (impl *ClusterCacheImpl) ZRange(key string, start, stop int64, withScores bool) ([][]byte, error)
- func (impl *ClusterCacheImpl) ZRemRangeByScore(key string, start, stop int64) (int64, error)
- type ClusterOptions
- type RedisCacheImpl
- func (impl *RedisCacheImpl) Close()
- func (impl *RedisCacheImpl) Database() int
- func (impl *RedisCacheImpl) Del(key string) error
- func (impl *RedisCacheImpl) Dels(args []string) error
- func (impl *RedisCacheImpl) Exists(key string) (bool, error)
- func (impl *RedisCacheImpl) ExpireAt(key string, expireAt int64) error
- func (impl *RedisCacheImpl) Get(key string) ([]byte, error)
- func (impl *RedisCacheImpl) HDel(key string, fields ...[]byte) (int64, error)
- func (impl *RedisCacheImpl) HExists(key string, field []byte) (bool, error)
- func (impl *RedisCacheImpl) HGetAll(key string) ([][]byte, error)
- func (impl *RedisCacheImpl) HMGet(key string, fields ...[]byte) ([][]byte, error)
- func (impl *RedisCacheImpl) HMSet(key string, ttl int64, args ...[]byte) error
- func (impl *RedisCacheImpl) HVals(key string) ([][]byte, error)
- func (impl *RedisCacheImpl) Incr(key string) (int64, error)
- func (impl *RedisCacheImpl) Initialize(cfg interface{})
- func (impl *RedisCacheImpl) Keys(keyFormat string) ([][]byte, error)
- func (impl *RedisCacheImpl) LPush(key string, ttl int64, members ...[]byte) error
- func (impl *RedisCacheImpl) Publish(channel string, members ...[]byte) (int64, error)
- func (impl *RedisCacheImpl) SAdd(key string, ttl int64, members ...[]byte) error
- func (impl *RedisCacheImpl) SCard(key string) (int64, error)
- func (impl *RedisCacheImpl) SIsMember(key string, member []byte) (bool, error)
- func (impl *RedisCacheImpl) SMembers(key string) ([][]byte, error)
- func (impl *RedisCacheImpl) SRem(key string, members ...[]byte) (int64, error)
- func (impl *RedisCacheImpl) SScan(key string, count int64) ([][]byte, error)
- func (impl *RedisCacheImpl) Set(key string, value []byte, ttl int64) error
- func (impl *RedisCacheImpl) ZAdd(key string, ttl int64, args ...[]byte) error
- func (impl *RedisCacheImpl) ZRange(key string, start, stop int64, withScores bool) ([][]byte, error)
- func (impl *RedisCacheImpl) ZRem(key string, members ...[]byte) (int64, error)
- func (impl *RedisCacheImpl) ZRemRangeByScore(key string, start, stop int64) (int64, error)
- type RedisOptions
Constants ¶
View Source
const ( // DefaultRedisNetwork the redis network option, "tcp" DefaultRedisNetwork = "tcp" // DefaultRedisAddr the redis address option, "127.0.0.1:6379" DefaultRedisAddr = "127.0.0.1:6379" // DefaultRedisIdleTimeout the redis idle timeout option, time.Second DefaultRedisIdleTimeout = 60 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterCacheImpl ¶
type ClusterCacheImpl struct {
// contains filtered or unexported fields
}
func (*ClusterCacheImpl) Del ¶
func (impl *ClusterCacheImpl) Del(key string) error
func (*ClusterCacheImpl) Dels ¶
func (impl *ClusterCacheImpl) Dels(args []string) error
func (*ClusterCacheImpl) HDel ¶
func (impl *ClusterCacheImpl) HDel(key string, fields ...[]byte) (int64, error)
func (*ClusterCacheImpl) HExists ¶
func (impl *ClusterCacheImpl) HExists(key string, field []byte) (bool, error)
func (*ClusterCacheImpl) HGetAll ¶
func (impl *ClusterCacheImpl) HGetAll(key string) ([][]byte, error)
func (*ClusterCacheImpl) HMGet ¶
func (impl *ClusterCacheImpl) HMGet(key string, fields ...[]byte) ([][]byte, error)
func (*ClusterCacheImpl) HMSet ¶
func (impl *ClusterCacheImpl) HMSet(key string, ttl int64, args ...[]byte) error
func (*ClusterCacheImpl) Initialize ¶
func (impl *ClusterCacheImpl) Initialize(cfg interface{})
func (*ClusterCacheImpl) Keys ¶
func (impl *ClusterCacheImpl) Keys(keyFormat string) ([][]byte, error)
func (*ClusterCacheImpl) SAdd ¶
func (impl *ClusterCacheImpl) SAdd(key string, ttl int64, members ...[]byte) error
func (*ClusterCacheImpl) SIsMember ¶
func (impl *ClusterCacheImpl) SIsMember(key string, member []byte) (bool, error)
func (*ClusterCacheImpl) SMembers ¶
func (impl *ClusterCacheImpl) SMembers(key string) ([][]byte, error)
func (*ClusterCacheImpl) SRem ¶
func (impl *ClusterCacheImpl) SRem(key string, members ...[]byte) (int64, error)
func (*ClusterCacheImpl) Set ¶
func (impl *ClusterCacheImpl) Set(key string, value []byte, ttl int64) error
func (*ClusterCacheImpl) ZAdd ¶
func (impl *ClusterCacheImpl) ZAdd(key string, ttl int64, args ...[]byte) error
func (*ClusterCacheImpl) ZRemRangeByScore ¶
func (impl *ClusterCacheImpl) ZRemRangeByScore(key string, start, stop int64) (int64, error)
type ClusterOptions ¶
type RedisCacheImpl ¶
type RedisCacheImpl struct {
// contains filtered or unexported fields
}
func (*RedisCacheImpl) Close ¶
func (impl *RedisCacheImpl) Close()
func (*RedisCacheImpl) Database ¶
func (impl *RedisCacheImpl) Database() int
func (*RedisCacheImpl) Del ¶
func (impl *RedisCacheImpl) Del(key string) error
func (*RedisCacheImpl) Dels ¶
func (impl *RedisCacheImpl) Dels(args []string) error
func (*RedisCacheImpl) ExpireAt ¶
func (impl *RedisCacheImpl) ExpireAt(key string, expireAt int64) error
func (*RedisCacheImpl) HDel ¶
func (impl *RedisCacheImpl) HDel(key string, fields ...[]byte) (int64, error)
func (*RedisCacheImpl) HExists ¶
func (impl *RedisCacheImpl) HExists(key string, field []byte) (bool, error)
func (*RedisCacheImpl) HMGet ¶
func (impl *RedisCacheImpl) HMGet(key string, fields ...[]byte) ([][]byte, error)
func (*RedisCacheImpl) HMSet ¶
func (impl *RedisCacheImpl) HMSet(key string, ttl int64, args ...[]byte) error
func (*RedisCacheImpl) Initialize ¶
func (impl *RedisCacheImpl) Initialize(cfg interface{})
func (*RedisCacheImpl) LPush ¶
func (impl *RedisCacheImpl) LPush(key string, ttl int64, members ...[]byte) error
func (*RedisCacheImpl) Publish ¶
func (impl *RedisCacheImpl) Publish(channel string, members ...[]byte) (int64, error)
func (*RedisCacheImpl) SAdd ¶
func (impl *RedisCacheImpl) SAdd(key string, ttl int64, members ...[]byte) error
func (*RedisCacheImpl) SIsMember ¶
func (impl *RedisCacheImpl) SIsMember(key string, member []byte) (bool, error)
func (*RedisCacheImpl) SMembers ¶
func (impl *RedisCacheImpl) SMembers(key string) ([][]byte, error)
func (*RedisCacheImpl) SRem ¶
func (impl *RedisCacheImpl) SRem(key string, members ...[]byte) (int64, error)
func (*RedisCacheImpl) SScan ¶
func (impl *RedisCacheImpl) SScan(key string, count int64) ([][]byte, error)
func (*RedisCacheImpl) Set ¶
func (impl *RedisCacheImpl) Set(key string, value []byte, ttl int64) error
func (*RedisCacheImpl) ZAdd ¶
func (impl *RedisCacheImpl) ZAdd(key string, ttl int64, args ...[]byte) error
func (*RedisCacheImpl) ZRem ¶
func (impl *RedisCacheImpl) ZRem(key string, members ...[]byte) (int64, error)
func (*RedisCacheImpl) ZRemRangeByScore ¶
func (impl *RedisCacheImpl) ZRemRangeByScore(key string, start, stop int64) (int64, error)
type RedisOptions ¶
type RedisOptions struct { Network string Addr string Password string Prefix string Database int IdleTimeout int MaxIdle int MaxActive int }
func DefaultOptions ¶
func DefaultOptions() RedisOptions
DefaultConfig returns the default configuration for Redis service.
Click to show internal directories.
Click to hide internal directories.