Documentation ¶
Overview ¶
Package redis includes Redis implementation of Gnomock Preset interface. This Preset can be passed to gnomock.Start() function to create a configured Redis container to use in tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*P)
Option is an optional configuration of this Gnomock preset. Use available Options to configure the container.
func WithValues ¶
WithValues initializes Redis with the provided key/value pairs. These values never expire. See go-redis/redis package for information on supported value types.
func WithVersion ¶ added in v0.9.0
WithVersion sets image version.
type P ¶
P is a Gnomock Preset implementation for Redis storage.
func (*P) Ports ¶
func (p *P) Ports() gnomock.NamedPorts
Ports returns ports that should be used to access this container.
Click to show internal directories.
Click to hide internal directories.