Documentation ¶
Index ¶
- type Option
- type Redis
- func (c *Redis) Delete(key string) error
- func (c *Redis) Get(key string, v interface{}) error
- func (c *Redis) GetOrSet(key string, v interface{}, fn func() (interface{}, error), options ...Option) (interface{}, error)
- func (c *Redis) Key(list ...string) string
- func (c *Redis) Set(key string, v interface{}, options ...Option) error
- type RedisOption
- type RedisOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func NewRedis ¶
func NewRedis(servers []string, options ...RedisOption) *Redis
type RedisOption ¶
type RedisOption interface {
Configure(*Redis)
}
func WithMagic ¶
func WithMagic(s string) RedisOption
func WithPrefix ¶
func WithPrefix(s string) RedisOption
type RedisOptionFunc ¶
type RedisOptionFunc func(*Redis)
func (RedisOptionFunc) Configure ¶
func (f RedisOptionFunc) Configure(r *Redis)
Click to show internal directories.
Click to hide internal directories.