Versions in this module Expand all Collapse all v1 v1.4.1 Sep 27, 2020 Changes in this version + var ErrInvalidTagSet = errors.New("an even number of tags must be specified") + type Mode uint8 + const NearestMode + const PrimaryMode + const PrimaryPreferredMode + const SecondaryMode + const SecondaryPreferredMode + func ModeFromString(mode string) (Mode, error) + type Option func(*ReadPref) error + func WithMaxStaleness(ms time.Duration) Option + func WithTagSets(tagSets ...tag.Set) Option + func WithTags(tags ...string) Option + type ReadPref struct + func Nearest(opts ...Option) *ReadPref + func New(mode Mode, opts ...Option) (*ReadPref, error) + func Primary() *ReadPref + func PrimaryPreferred(opts ...Option) *ReadPref + func Secondary(opts ...Option) *ReadPref + func SecondaryPreferred(opts ...Option) *ReadPref + func (r *ReadPref) MaxStaleness() (time.Duration, bool) + func (r *ReadPref) Mode() Mode + func (r *ReadPref) TagSets() []tag.Set