Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyHost is an error that indicates no redis host is set. ErrEmptyHost = errors.New("empty redis host") // ErrEmptyType is an error that indicates no redis type is set. ErrEmptyType = errors.New("empty redis type") // ErrEmptyKey is an error that indicates no redis key is set. ErrEmptyKey = errors.New("empty redis key") )
Functions ¶
This section is empty.
Types ¶
type ClosableNode ¶
type ClosableNode interface {
RedisNode
Close()
}
ClosableNode interface represents a closable redis node.
func CreateBlockingNode ¶
func CreateBlockingNode(r *Redis) (ClosableNode, error)
CreateBlockingNode returns a ClosableNode.
type RedisConf ¶
type RedisConf struct { Host string Type string `json:",default=node,options=node|cluster"` Pass string `json:",optional"` Tls bool `json:",optional"` NonBlock bool `json:",default=true"` // PingTimeout is the timeout for ping redis. PingTimeout time.Duration `json:",default=1s"` DB int `json:",default=0"` }
A RedisConf is a redis config.
type RedisKeyConf ¶
A RedisKeyConf is a redis config with key.
func (RedisKeyConf) Validate ¶
func (rkc RedisKeyConf) Validate() error
Validate validates the RedisKeyConf.
Click to show internal directories.
Click to hide internal directories.