# Functions
ConnectServer creates a new Server and then initializes it using the Connect method.
New creates a new topology.
NewServer creates a new server.
WithAppName sets the application name which gets sent to MongoDB when it first connects.
WithClock configures the ClusterClock for the server to use.
WithCompressionOptions configures the server's compressors.
WithCompressors sets the compressors that can be used for communication.
WithConnectionOptions configures the server's connections.
WithConnectTimeout configures the maximum amount of time a dial will wait for a connect to complete.
WithConnString configures the topology using the connection string.
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.
WithHeartbeatInterval configures a server's heartbeat interval.
WithHeartbeatTimeout configures how long to wait for a heartbeat socket to connection.
WithIdleTimeout configures the maximum idle time to allow for a connection.
WithLifeTimeout configures the maximum life of a connection.
WithMaxConnections configures the maximum number of connections to allow for a given server.
WithMaxIdleConnections configures the maximum number of idle connections allowed for the server.
WithMode configures the topology's monitor mode.
WithMonitor configures a event for command monitoring.
WithReadTimeout configures the maximum read time for a connection.
WithRegistry configures the registry for the server to use when creating cursors.
WithReplicaSetName configures the topology's default replica set name.
WithSeedList configures a topology's seed list.
WithServerOptions configures a topology's server options for when a new server needs to be created.
WithServerSelectionTimeout configures a topology's server selection timeout.
WithTLSConfig configures the TLS options for a connection.
WithWriteTimeout configures the maximum write time for a connection.
WithZlibLevel sets the zLib compression level.
# Constants
These constants are the available monitoring modes.
These constants are the available monitoring modes.
# Variables
DefaultDialer is the Dialer implementation that is used by this package.
ErrConnectionClosed is returned from an attempt to use an already closed connection.
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.
ErrServerClosed occurs when an attempt to get a connection is made after the server has been closed.
ErrServerConnected occurs when at attempt to connect is made after a server has already been connected.
ErrServerSelectionTimeout is returned from server selection when the server selection process took longer than allowed by the timeout.
ErrSubscribeAfterClosed is returned when a user attempts to subscribe to a closed Server or Topology.
ErrTopologyClosed is returned when a user attempts to call a method on a closed Topology.
ErrTopologyConnected is returned whena user attempts to connect to an already connected Topology.
ErrWrongPool is return when a connection is returned to a pool it doesn't belong to.
# Structs
Connection implements the driver.Connection interface.
ConnectionError represents a connection error.
SelectedServer represents a specific server that was selected during server selection.
Server is a single server within a topology.
ServerSubscription represents a subscription to the description.Server updates for a specific server.
Subscription is a subscription to updates to the description of the Topology that created this Subscription.
Topology represents a MongoDB deployment.
# Interfaces
Dialer is used to make network connections.
# Type aliases
ConnectionOption is used to configure a connection.
DialerFunc is a type implemented by functions that can be used as a Dialer.
Handshaker is the interface implemented by types that can perform a MongoDB handshake over a provided driver.Connection.
HandshakerFunc is an adapter to allow the use of ordinary functions as connection handshakers.
MonitorMode represents the way in which a server is monitored.
Option is a configuration option for a topology.
PoolError is an error returned from a Pool method.
ServerOption configures a server.