Documentation ¶
Overview ¶
Spawns a Redis server. Ideal for unit tests where you want a clean instance each time. Then clean up afterwards.
Requires Redis to be installed on your system (but it doesn't have to be running).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
type Redis struct { // A redis pool pre-configured to talk to the redis server Pool *redis.Pool // Network protocol to pass to redis.Dial() Network string // Address to pass to redis.Dial() Address string // contains filtered or unexported fields }
func Start ¶
Start a new Redis database, on temporary storage.
This database has persistance disabled for performance, so it might run faster than your production database. This makes it less reliable in case of system crashes, but we don't care about that anyway during unit testing.
Use the Pool field to access the database connection
Click to show internal directories.
Click to hide internal directories.