Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachePipel ¶
type RedisClient ¶
type RedisClient interface {
Close() error
Ping(ctx context.Context) string
CountKeys(ctx context.Context) (int, error)
Get(ctx context.Context, k string) ([]byte, error)
Set(ctx context.Context, k string, v interface{}, exp time.Duration) (string, error)
Del(ctx context.Context, k ...string) (int64, error)
DelKeys(ctx context.Context, pattern string) (int64, error)
LPush(ctx context.Context, k string, v interface{}) (int64, error)
RPop(ctx context.Context, k string) ([]byte, error)
HGet(ctx context.Context, key string, field string) string
HSet(ctx context.Context, key string, values map[string]string) error
HGetAll(ctx context.Context, key string) map[string]string
Exists(ctx context.Context, key string) bool
Expired(ctx context.Context, key string, d time.Duration) (bool, error)
NewPiple(ctx context.Context) CachePipel
Keys(ctx context.Context, pattern string) ([]string, error)
TTL(ctx context.Context, key string) (time.Duration, error)
MGet(ctx context.Context, keys []string) ([]interface{}, error)
}
type RedisConf ¶
type RedisConf struct {
Host string `yaml:"host"`
Pwd string `yaml:"pass"`
DbMap map[string]int `yaml:"dbMap"`
sync.Mutex
// contains filtered or unexported fields
}
func (*RedisConf) NewManagerStore ¶ added in v1.4.0
func (*RedisConf) NewRedisDbConn ¶
func (rc *RedisConf) NewRedisDbConn(name string) (RedisClient, error)
Click to show internal directories.
Click to hide internal directories.