tag

package
v1.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 2 Imported by: 139

Documentation

Overview

Package tag provides types for filtering replica set members using tags in a read preference.

For more information about read preference tags, see https://www.mongodb.com/docs/manual/core/read-preference-tags/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set []Tag

Set is an ordered list of Tags.

func NewTagSetFromMap

func NewTagSetFromMap(m map[string]string) Set

NewTagSetFromMap creates a tag set from a map.

For more information about read preference tags, see https://www.mongodb.com/docs/manual/core/read-preference-tags/

func NewTagSetsFromMaps

func NewTagSetsFromMaps(maps []map[string]string) []Set

NewTagSetsFromMaps creates a list of tag sets from a slice of maps.

For more information about read preference tags, see https://www.mongodb.com/docs/manual/core/read-preference-tags/

func (Set) Contains

func (ts Set) Contains(name, value string) bool

Contains indicates whether the name/value pair exists in the tagset.

func (Set) ContainsAll

func (ts Set) ContainsAll(other []Tag) bool

ContainsAll indicates whether all the name/value pairs exist in the tagset.

func (Set) String added in v1.4.0

func (ts Set) String() string

String returns a human-readable human-readable description of the tagset.

type Tag

type Tag struct {
	Name  string
	Value string
}

Tag is a name/value pair.

func (Tag) String added in v1.4.0

func (tag Tag) String() string

String returns a human-readable human-readable description of the tag.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL