Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher interface {
Get(key string) (string, error)
Set(key, value string, expireInSec int) error
}
Cacher is an interface that represents an object that caches objects.
type Config ¶
type Config struct {
Name string
Topology string
Host string
Port int
Password string
SentinelMasterName string
PoolSize int
MinIdleConnections int
PoolTimeout time.Duration
ConnectionIdleTimeout time.Duration
DialTimeout time.Duration
ReadTimeout time.Duration
WriteTimeout time.Duration
MaxRetries int
MaxRetryBackoff time.Duration
}
Config has the redis configs
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
RedisCache is a redis cache object.
func NewRedis ¶
func NewRedis(config Config) *RedisCache
NewRedis instantiate a new redis cluster client
Click to show internal directories.
Click to hide internal directories.