package
0.3.0
Repository: https://github.com/mongodb/mongo-go-driver.git
Documentation: pkg.go.dev

# Functions

Listen creates a new listener on the provided network and address.
New opens a connection to a given Addr The server description returned is nil if there was no handshaker provided.
NewPool creates a new pool that will hold size number of idle connections and will create a max of capacity connections.
NewTLSConfig creates a new TLSConfig.
WithAppName sets the application name which gets sent to MongoDB when it first connects.
WithCompressors sets the compressors that can be used for communication.
WithConnectTimeout configures the maximum amount of time a dial will wait for a connect to complete.
WithDialer configures the Dialer to use when making a new connection to MongoDB.
WithHandshaker configures the Handshaker that wll be used to initialize newly dialed connections.
WithIdleTimeout configures the maximum idle time to allow for a connection.
WithLifeTimeout configures the maximum life of a connection.
WithMonitor configures a event for command monitoring.
WithReadTimeout configures the maximum read time for a connection.
WithTLSConfig configures the TLS options for a connection.
WithWriteTimeout configures the maximum write time for a connection.

# Variables

DefaultDialer is the Dialer implementation that is used by this package.
ErrConnectionClosed is returned from an attempt to use an already closed connection.
ErrPoolClosed is returned from an attempt to use a closed pool.
ErrPoolConnected is returned from an attempt to connect an already connected pool.
ErrPoolDisconnected is returned from an attempt to disconnect an already disconnected or disconnecting pool.
ErrSizeLargerThanCapacity is returned from an attempt to create a pool with a size larger than the capacity.

# Structs

Error represents a connection error.
NetworkError represents an error that occurred while reading from or writing to a network socket.
Proxy implements a MongoDB proxy.
Server is used to handle incoming Connections.
TLSConfig contains options for configuring a TLS connection to the server.

# Interfaces

Connection is used to read and write wire protocol messages to a network.
Dialer is used to make network connections.
Handler handles an individual Connection.
Handshaker is the interface implemented by types that can perform a MongoDB handshake over a provided ReadWriter.
Listener is a generic mongodb network protocol listener.
Pool is used to pool Connections to a server.

# Type aliases

Addr is a network address.
DialerFunc is a type implemented by functions that can be used as a Dialer.
HandshakerFunc is an adapter to allow the use of ordinary functions as connection handshakers.
Option is used to configure a connection.
PoolError is an error returned from a Pool method.