Documentation
¶
Overview ¶
Package mongo implements a deliberately tiny MongoDB client: just enough OP_MSG + BSON to run administrative commands (hello, replSetInitiate, addShard, ...) against unauthenticated sandbox instances launched by mlaunch-go. It has no external dependencies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitForPrimary ¶
WaitForPrimary polls the members until one of them reports being a writable primary.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a single-connection MongoDB client.
func (*Client) Authenticate ¶
Authenticate performs a SCRAM-SHA-256 (RFC 7677) conversation on the connection for the given user in the given auth database (usually "admin"). Implemented with stdlib crypto only.
type CommandError ¶
type CommandError struct{ Reply M }
CommandError is returned when the server replies with ok != 1.
func (*CommandError) Error ¶
func (e *CommandError) Error() string
Click to show internal directories.
Click to hide internal directories.