Documentation ¶
Overview ¶
Package redistest privides temporary redis-server for testing.
This is basic usage of redistest.
s, err := redistest.NewServer(true, nil) if err != nil { panic(err) } defer s.Stop() conn, err := redis.Dial("unix", s.Config["unixsocket"]) if err != nil { panic(err) } _, err = conn.Do("PING") if err != nil { panic(err) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error is error while starting redis
func (*Error) Cause ¶
Cause returns the underlying cause of the error. The error can be inspected by errors.Cause https://github.com/pkg/errors
type Server ¶
type Server struct { Config Config TempDir string TimeOut time.Duration // contains filtered or unexported fields }
Server is main struct of redistest.
Click to show internal directories.
Click to hide internal directories.