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

# Functions

ModeFromString returns a mode corresponding to mode.
Nearest constructs a read preference with a NearestMode.
New creates a new ReadPref.
Primary constructs a read preference with a PrimaryMode.
PrimaryPreferred constructs a read preference with a PrimaryPreferredMode.
Secondary constructs a read preference with a SecondaryMode.
SecondaryPreferred constructs a read preference with a SecondaryPreferredMode.
WithMaxStaleness sets the maximum staleness a server is allowed.
WithTags sets a single tag set used to match a server.
WithTagSets sets the tag sets used to match a server.

# Constants

NearestMode indicates that all primaries and secondaries will be considered.
PrimaryMode indicates that only a primary is considered for reading.
PrimaryPreferredMode indicates that if a primary is available, use it; otherwise, eligible secondaries will be considered.
SecondaryMode indicates that only secondaries should be considered.
SecondaryPreferredMode indicates that only secondaries should be considered when one is available.

# Variables

ErrInvalidTagSet indicates that an invalid set of tags was specified.

# Structs

ReadPref determines which servers are considered suitable for read operations.

# Type aliases

Mode indicates the user's preference on reads.
Option configures a read preference.