# Functions
ConnectServer creates a new Server and then initializes it using the Connect method.
ConvertCreds takes an [options.Credential] and returns the equivalent [driver.Cred].
ConvertToDriverAPIOptions converts a options.ServerAPIOptions instance to a driver.ServerAPIOptions.
New creates a new topology.
NewConfig will translate data from client options into a topology config for building non-default deployments.
NewConfigWithAuthenticator will translate data from client options into a topology config for building non-default deployments.
NewServer creates a new server.
ServerAPIFromServerOptions will return the server API options if they have been functionally set on the ServerOption slice.
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.
WithConnectionLoadBalanced specifies whether or not the connection is to a server behind a load balancer.
WithConnectionOptions configures the server's connections.
WithConnectionPoolMaintainInterval configures the interval that the background connection pool maintenance goroutine runs.
WithConnectionPoolMaxIdleTime configures the maximum time that a connection can remain idle in the connection pool before being removed.
WithConnectionPoolMonitor configures the monitor for all connection pool actions.
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.
WithDisableOCSPEndpointCheck specifies whether or the driver should perform non-stapled OCSP verification.
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.
WithHTTPClient configures the HTTP client for a connection.
WithIdleTimeout configures the maximum idle time to allow for a connection.
WithMaxConnecting configures the maximum number of connections a connection pool may establish simultaneously.
WithMaxConnections configures the maximum number of connections to allow for a given server.
WithMinConnections configures the minimum number of connections to allow for a given server.
WithMonitor configures a event for command monitoring.
WithOCSPCache specifies a cache to use for OCSP verification.
WithReadTimeout configures the maximum read time for a connection.
WithRegistry configures the registry for the server to use when creating cursors.
WithServerAPI configures the server API options for the server to use.
WithServerAppName configures the server's application name.
WithServerLoadBalanced specifies whether or not the server is behind a load balancer.
WithServerMonitor configures the monitor for all SDAM events for a server.
WithTLSConfig configures the TLS options for a connection.
WithWriteTimeout configures the maximum write time for a connection.
WithZlibLevel sets the zLib compression level.
WithZstdLevel sets the zstd compression level.
# Constants
These constants are the available monitoring modes.
These constants are the available monitoring modes.
# Variables
BGReadCallback is a callback for monitoring the behavior of the background-read-on-timeout connection preserving mechanism.
BGReadTimeout is the maximum amount of the to wait when trying to read the server reply on a connection after an operation timed out.
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 when attempting to check out a connection from a closed pool.
ErrPoolNotPaused is returned when attempting to mark a connection pool "ready" that is not currently "paused".
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.
MinSupportedMongoDBVersion is the version string for the lowest MongoDB version supported by the driver.
SupportedWireVersions is the range of wire versions supported by the driver.
# Structs
Config is used to construct a topology.
Connection implements the driver.Connection interface to allow reading and writing wire messages and the driver.Expirable interface to allow expiring.
ConnectionError represents a connection error.
SelectedServer represents a specific server that was selected during server selection.
Server is a single server within a topology.
ServerSelectionError represents a Server Selection error.
ServerSubscription represents a subscription to the description.Server updates for a specific server.
Topology represents a MongoDB deployment.
WaitQueueTimeoutError represents a timeout when requesting a connection from the pool.
# 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.
MonitorMode represents the way in which a server is monitored.
PoolError is an error returned from a Pool method.
ServerOption configures a server.