Documentation ¶
Index ¶
Constants ¶
View Source
const (
// KeySeparator is the separator for the Redis key
KeySeparator = ":"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionHandler ¶
type ConnectionHandler interface { Connect() (*redis.Client, error) GetClient() (*redis.Client, error) Disconnect() }
ConnectionHandler interface
type DefaultConnectionHandler ¶
type DefaultConnectionHandler struct { Client *redis.Client ClientOptions *redis.Options }
DefaultConnectionHandler struct
func NewDefaultConnectionHandler ¶
func NewDefaultConnectionHandler(config *Config) DefaultConnectionHandler
NewDefaultConnectionHandler creates a new connection
func (DefaultConnectionHandler) Connect ¶
func (d DefaultConnectionHandler) Connect() (*redis.Client, error)
Connect returns a new Redis client
func (DefaultConnectionHandler) Disconnect ¶
func (d DefaultConnectionHandler) Disconnect()
Disconnect closes the Redis client connection
func (DefaultConnectionHandler) GetClient ¶
func (d DefaultConnectionHandler) GetClient() (*redis.Client, error)
GetClient returns the Redis client
Click to show internal directories.
Click to hide internal directories.