Documentation
¶
Overview ¶
Package tinyredis provides utilities for handling Redis.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// 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
// NoPing indicates whether Dial should skip the initial call to Ping method (default: false).
NoPing bool
}
Config holds a configuration for Dial call.
type Opt ¶
type Opt = func(*Config)
Opt is an option to be specified to Dial.
func ConnectionTimeout ¶
ConnectionTimeout is a maximum time client should spend trying to connect.
func NoPing ¶ added in v1.0.15
func NoPing() Opt
NoPing indicates that Dial should skip the initial call to Ping method.
Click to show internal directories.
Click to hide internal directories.