Documentation ¶
Overview ¶
Package mongo provides mongo connectivity support.
Index ¶
- func CloseSession(goRoutine string, mongoSession *mgo.Session)
- func CopySession(goRoutine string) (*mgo.Session, error)
- func GetCollection(mongoSession *mgo.Session, collectionName string) (collection *mgo.Collection)
- func GetSession(goRoutine string) (*mgo.Session, error)
- func Shutdown(goRoutine string) error
- func Startup(goRoutine string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseSession ¶
CloseSession puts the connection back into the pool.
func CopySession ¶
CopySession get a new connection based on an existing connection.
func GetCollection ¶
func GetCollection(mongoSession *mgo.Session, collectionName string) (collection *mgo.Collection)
GetCollection returns a reference to a collection for the specified database and collection name.
func GetSession ¶
GetSession grabs a connection from the pool for use.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.