# 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.