Documentation
¶
Overview ¶
Package cache defines and implement the cache layer, especially for redis
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Rediser ¶
type Rediser interface { Set(ctx context.Context, key string, value interface{}, ttl time.Duration) *redis.StatusCmd SetXX(ctx context.Context, key string, value interface{}, ttl time.Duration) *redis.BoolCmd SetNX(ctx context.Context, key string, value interface{}, ttl time.Duration) *redis.BoolCmd Get(ctx context.Context, key string) *redis.StringCmd Del(ctx context.Context, keys ...string) *redis.IntCmd }
func NewReplicaRedisService ¶
func NewReplicaRedisService(MasterAddrs []config.RedisAddress, SlaveAddrs []config.RedisAddress, Password string) (Rediser, error)
Click to show internal directories.
Click to hide internal directories.