mongo

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 23 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Wm []byte
	Op Operation
}

func IsMasterResponse

func IsMasterResponse(responseTo int32, topologyKind description.TopologyKind) (*Message, error)

hard-coded response, emulating an upstream isMaster response from MongoDB

type Mongo

type Mongo struct {
	// contains filtered or unexported fields
}

func Connect

func Connect(log *zap.Logger, sd *statsd.Client, opts *options.ClientOptions, ping bool) (*Mongo, error)

func (*Mongo) Close

func (m *Mongo) Close()

func (*Mongo) Description added in v0.0.3

func (m *Mongo) Description() description.Topology

func (*Mongo) RoundTrip

func (m *Mongo) RoundTrip(msg *Message) (*Message, error)

type Operation

type Operation interface {
	OpCode() wiremessage.OpCode
	Encode(responseTo int32) []byte
	IsIsMaster() bool
	CursorID() (cursorID int64, ok bool)
	RequestID() int32
	Error() error
	Unacknowledged() bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL