Versions in this module Expand all Collapse all v0 v0.0.13 Dec 1, 2021 Changes in this version + func IsIsMasterDoc(doc bsoncore.Document) bool + func IsIsMasterValueTruthy(val bsoncore.Value) bool + func IsWrite(command Command) bool + type Command string + const AbortTransaction + const Aggregate + const CommitTransaction + const Count + const CreateIndexes + const Delete + const Distinct + const Drop + const DropDatabase + const DropIndexes + const EndSessions + const Find + const FindAndModify + const GetMore + const Insert + const IsMaster + const Ismaster + const ListCollections + const ListDatabases + const ListIndexes + const MapReduce + const Unknown + const Update + func CommandAndCollection(msg bsoncore.Document) (Command, string) + type Message struct + Op Operation + Wm []byte + func IsMasterResponse(responseTo int32, topologyKind description.TopologyKind) (*Message, error) + type Mongo struct + func Connect(log *zap.Logger, sd *statsd.Client, opts *options.ClientOptions, ping bool) (*Mongo, error) + func (m *Mongo) Close() + func (m *Mongo) Description() description.Topology + func (m *Mongo) RoundTrip(msg *Message, tags []string) (_ *Message, err error) + type Operation interface + CommandAndCollection func() (Command, string) + CursorID func() (cursorID int64, ok bool) + Encode func(responseTo int32) []byte + Error func() error + IsIsMaster func() bool + OpCode func() wiremessage.OpCode + RequestID func() int32 + Unacknowledged func() bool + func Decode(wm []byte) (Operation, error)