Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { Fetch(context.Context, Key, Thunk) Result Ping(context.Context) *redis.StatusCmd }
Connection provides an interface for the connection used for fetching Redis keys
func NewTestConnection ¶
func NewTestConnection(options *Options) Connection
NewTestConnection returns a TestConnection instance, which satisfies the Connection interface and can be used in tests
type RealConnection ¶
type RealConnection struct {
*redis.Client
}
RealConnection handles a Redis connection
type TestConnection ¶
type TestConnection struct{}
TestConnection is a fake connection used for testing
func (*TestConnection) Ping ¶
func (c *TestConnection) Ping(ctx context.Context) *redis.StatusCmd
Ping pretends to ping the Redis instance
Click to show internal directories.
Click to hide internal directories.