Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package redisutil provides utilities for handling Redis.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
	*redis.Client
}
    Client is a wrapper for *redis.Client providing a handy Close() function.
type Config ¶ added in v1.1.58
type Config struct {
	// Address is a remote host and port to connect to.
	Address string
	// Username is an optional property used in authorization.
	Username string
	// Password is an optional property used in authorization.
	Password string
	// DB is a database number to use (default: 0).
	DB int
	// TLSConfig setting it to non-nil value enables TLS mode.
	TLSConfig *tls.Config
	// ConnectionTimeout is a maximum time client should spend trying to connect (default: 5s).
	ConnectionTimeout time.Duration
}
    Config holds a configuration for Client.
type Opt ¶ added in v1.1.58
type Opt = func(*Config)
Opt is an option to be specified to DialRedis.
func ConnectionTimeout ¶ added in v1.1.58
ConnectionTimeout is a maximum time client should spend trying to connect.
 Click to show internal directories. 
   Click to hide internal directories.