Documentation
¶
Overview ¶
Package mgotest provides standalone test instances of mongo sutable for use in tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fatalf ¶
type Fatalf interface {
Fatalf(format string, args ...interface{})
}
Fatalf is satisfied by testing.T or testing.B.
type ReplicaSet ¶
ReplicaSet provides a configured ReplicaSet.
func NewReplicaSet ¶
func NewReplicaSet(num uint, tb Fatalf) *ReplicaSet
NewReplicaSet makes a new ReplicaSet with the given number of nodes.
func (*ReplicaSet) Session ¶
func (r *ReplicaSet) Session() *mgo.Session
Session for the mongo ReplicaSet.
type Server ¶
type Server struct { Port int DBPath string ReplSet bool StopTimeout time.Duration T Fatalf // contains filtered or unexported fields }
Server is a unique instance of a mongod.
func NewReplSetServer ¶
NewReplSetServer creates a new server starts it with ReplSet enabled.
func NewStartedServer ¶
NewStartedServer creates a new server starts it.
Click to show internal directories.
Click to hide internal directories.