Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNilConfig = errors.New("redis config cannot be nil")
)
Functions ¶
This section is empty.
Types ¶
type ConnConfig ¶ added in v0.5.0
type ConnConfig struct {
// contains filtered or unexported fields
}
ConnConfig struct
func NewConnConfig ¶ added in v0.5.0
func NewConnConfig(uri, password string, database int) *ConnConfig
NewConnConfig creates a new Redis config
func (*ConnConfig) Database ¶ added in v0.5.0
func (c *ConnConfig) Database() int
Database returns the database
func (*ConnConfig) Password ¶ added in v0.5.0
func (c *ConnConfig) Password() string
Password returns the password
type ConnHandler ¶ added in v0.5.0
type ConnHandler interface { Connect() (*redis.Client, error) Client() (*redis.Client, error) Disconnect() }
ConnHandler interface
type DefaultConnHandler ¶ added in v0.5.0
type DefaultConnHandler struct {
// contains filtered or unexported fields
}
DefaultConnHandler struct
func NewDefaultConnHandler ¶ added in v0.5.0
func NewDefaultConnHandler(config Config) ( *DefaultConnHandler, error, )
NewDefaultConnHandler creates a new connection
func (*DefaultConnHandler) Client ¶ added in v0.5.0
func (d *DefaultConnHandler) Client() (*redis.Client, error)
Client returns the Redis client
func (*DefaultConnHandler) Connect ¶ added in v0.5.0
func (d *DefaultConnHandler) Connect() (*redis.Client, error)
Connect returns a new Redis client
func (*DefaultConnHandler) Disconnect ¶ added in v0.5.0
func (d *DefaultConnHandler) Disconnect()
Disconnect closes the Redis client connection
Click to show internal directories.
Click to hide internal directories.