drivertest

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeReply

func MakeReply(doc bsoncore.Document) []byte

MakeReply creates an OP_REPLY wiremessage from a BSON document

Types

type ChannelConn

type ChannelConn struct {
	WriteErr error
	Written  chan []byte
	ReadResp chan []byte
	ReadErr  chan error
	Desc     description.Server
}

ChannelConn implements the driver.Connection interface by reading and writing wire messages to a channel

func (*ChannelConn) Address

func (c *ChannelConn) Address() address.Address

Address implements the driver.Connection interface.

func (*ChannelConn) Close

func (c *ChannelConn) Close() error

Close implements the driver.Connection interface.

func (*ChannelConn) Description

func (c *ChannelConn) Description() description.Server

Description implements the driver.Connection interface.

func (*ChannelConn) ID

func (c *ChannelConn) ID() string

ID implements the driver.Connection interface.

func (*ChannelConn) ReadWireMessage

func (c *ChannelConn) ReadWireMessage(ctx context.Context, dst []byte) ([]byte, error)

ReadWireMessage implements the driver.Connection interface.

func (*ChannelConn) WriteWireMessage

func (c *ChannelConn) WriteWireMessage(ctx context.Context, wm []byte) error

WriteWireMessage implements the driver.Connection interface.

Jump to

Keyboard shortcuts

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