package
4.0.18+incompatible
Repository: https://github.com/mongodb/mongo-tools-common.git
Documentation: pkg.go.dev

# Functions

ApplyFlags applies flags to the given query session.
Returns whether the tools can continue when encountering the given error.
FilterError determines whether an error needs to be propagated back to the user or can be continued through.
No description provided by the author
Assumes that mongo.Database will normalize legacy names to omit database name as required by the Enumerate Collections spec.
GetIndexes returns an iterator to thethe raw index info for a collection by using the listIndexes command if available, or by falling back to querying against system.indexes (pre-3.0 systems).
GetLatestOplogOpTime returns the optime of the most recent oplog record satisfying the given `query` or a zero-value db.OpTime{} if no oplog record matches.
GetLatestVisibleOplogOpTime returns the optime of the most recent "visible" oplog record.
GetOldestActiveTransactionOpTime returns the oldest active transaction optime from the config.transactions table or else a zero-value db.OpTime{}.
GetOplogTailTime constructs an OplogTailTime.
GetOpTimeFromOplogEntry returns an OpTime struct from the relevant fields in an Oplog struct.
GetOpTimeFromRawOplogEntry looks up the ts (timestamp), t (term), and h (hash) fields in a raw oplog entry, and assigns them to an OpTime.
IsMMAPV1 returns whether the storage engine is MMAPV1.
NewBSONSource creates a BSONSource with a reusable I/O buffer.
NewBufferlessBSONSource creates a BSONSource without a reusable I/O buffer.
No description provided by the author
NewMongoWriteConcern takes a string (from the command line writeConcern option) and a ConnString object (from the command line uri option) and returns a WriteConcern.
NewOrderedBufferedBulkInserter returns an initialized BufferedBulkInserter for performing ordered bulk writes.
NewReadPreference takes a string (command line read preference argument) and a ConnString (from the command line URI argument) and returns a ReadPref.
NewSessionProvider constructs a session provider, including a connected client.
NewOrderedBufferedBulkInserter returns an initialized BufferedBulkInserter for performing unordered bulk writes.
OpTimeEquals returns true if lhs equals rhs, false otherwise.
OpTimeGreaterThan returns true if lhs comes after rhs, false otherwise.
OpTimeIsEmpty returns true if opTime is uninitialized, false otherwise.
OpTimeLessThan returns true if lhs comes before rhs, false otherwise.
No description provided by the author

# Constants

Default port for integration tests.
Session flags.
No description provided by the author
No description provided by the author
No description provided by the author
ignorable errors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
replication errors list the replset name if we are talking to a mongos, so we can only check for this universal prefix.
No description provided by the author
No description provided by the author
No description provided by the author
Query flags.
16MB - maximum BSON document size.
No description provided by the author
Session flags.
Session flags.
Query flags.
No description provided by the author
Query flags.
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

ApplyOpsResponse represents the response from an 'applyOps' command.
BSONSource reads documents from the underlying io.ReadCloser, Stream which wraps a stream of BSON documents.
BufferedBulkInserter implements a bufio.Writer-like design for queuing up documents and inserting them in bulk when the given doc limit (or max message size) is reached.
No description provided by the author
DecodedBSONSource reads documents from the underlying io.ReadCloser, Stream which wraps a stream of BSON documents.
DeferredQuery represents a deferred query.
Oplog represents a MongoDB oplog document.
OplogTailTime represents two ways of describing the "end" of the oplog at a point in time.
OpTime represents the values to uniquely identify an oplog entry.
Used to manage database sessions.

# Interfaces

CommandRunner exposes functions that can be run against a server XXX Does anything rely on this?.
RawDocSource wraps basic functions for reading a BSON source file.

# Type aliases

No description provided by the author
No description provided by the author