Documentation ¶
Index ¶
- func AddCodeCommentToQuery(query *mgo.Query) *mgo.Query
- func LoadCaFrom(pemFile string) (*x509.CertPool, error)
- func LoadKeyPairFrom(pemFile string, privateKeyPemFile string) (tls.Certificate, error)
- func MongoSession(opts *MongoSessionOpts) *mgo.Session
- func MongoSessionNodeType(session *mgo.Session) (string, error)
- func MongoSessionServerVersion(session *mgo.Session) (string, error)
- func RedactMongoUri(uri string) string
- func TestConnection(opts MongoSessionOpts) ([]byte, error)
- type MongoSessionOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCodeCommentToQuery ¶ added in v0.4.0
func AddCodeCommentToQuery(query *mgo.Query) *mgo.Query
AddCodeCommentToQuery adds location of the caller in the source code (e.g. "oplog_status.go:91") to the given query as a comment.
func LoadKeyPairFrom ¶ added in v0.2.0
func LoadKeyPairFrom(pemFile string, privateKeyPemFile string) (tls.Certificate, error)
func MongoSession ¶
func MongoSession(opts *MongoSessionOpts) *mgo.Session
MongoSession connects to MongoDB and returns ready to use MongoDB session.
func MongoSessionNodeType ¶
func RedactMongoUri ¶ added in v0.2.0
func TestConnection ¶ added in v0.6.0
func TestConnection(opts MongoSessionOpts) ([]byte, error)
TestConnection connects to MongoDB and returns BuildInfo.
Types ¶
Click to show internal directories.
Click to hide internal directories.