Documentation ¶
Overview ¶
Package mongo provides functionality for working with MongoDB outgoing calls.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsIsMasterDoc ¶
func IsIsMasterValueTruthy ¶
func NewMongo ¶
func NewMongo(logger *zap.Logger) integrations.Integrations
Types ¶
type Command ¶
type Command string
const ( Unknown Command = "unknown" AbortTransaction Command = "abortTransaction" Aggregate Command = "aggregate" CommitTransaction Command = "commandTransaction" Count Command = "count" CreateIndexes Command = "createIndexes" Delete Command = "delete" Distinct Command = "distinct" Drop Command = "drop" DropDatabase Command = "dropDatabase" DropIndexes Command = "dropIndexes" EndSessions Command = "endSessions" Find Command = "find" FindAndModify Command = "findAndModify" GetMore Command = "getMore" Insert Command = "insert" IsMaster Command = "isMaster" Ismaster Command = "ismaster" ListCollections Command = "listCollections" ListIndexes Command = "listIndexes" ListDatabases Command = "listDatabases" MapReduce Command = "mapReduce" Update Command = "tools" )
constants for all the commands that can be proxied
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
func (*Mongo) MatchType ¶
MatchType determines if the outgoing network call is Mongo by comparing the message format with that of a mongo wire message.
func (*Mongo) MockOutgoing ¶
func (m *Mongo) MockOutgoing(ctx context.Context, src net.Conn, dstCfg *integrations.ConditionalDstCfg, mockDb integrations.MockMemDb, opts models.OutgoingOptions) error
type Operation ¶
type Operation interface { fmt.Stringer OpCode() wiremessage.OpCode Encode(responseTo, requestID int32) []byte IsIsMaster() bool IsIsAdminDB() bool CursorID() (cursorID int64, ok bool) RequestID() int32 Error() error Unacknowledged() bool CommandAndCollection() (Command, string) TransactionDetails() *TransactionDetails }
type TransactionDetails ¶
Click to show internal directories.
Click to hide internal directories.