MCPcopy Index your code
hub / github.com/prometheus/prometheus / equalMultiStringMapMatcher

Struct equalMultiStringMapMatcher

model/labels/regexp.go:881–891  ·  view source on GitHub ↗

equalMultiStringMapMatcher matches a string exactly against a map of valid values or against a set of prefix matchers.

Source from the content-addressed store, hash-verified

879// equalMultiStringMapMatcher matches a string exactly against a map of valid values
880// or against a set of prefix matchers.
881type equalMultiStringMapMatcher struct {
882 // values contains values to match a string against. If the matching is case insensitive,
883 // the values here must be lowercase.
884 values map[string]struct{}
885 // prefixes maps strings, all of length minPrefixLen, to sets of matchers to check the rest of the string.
886 // If the matching is case insensitive, prefixes are all lowercase.
887 prefixes map[string][]StringMatcher
888 // minPrefixLen can be zero, meaning there are no prefix matchers.
889 minPrefixLen int
890 caseSensitive bool
891}
892
893func (m *equalMultiStringMapMatcher) add(s string) {
894 if !m.caseSensitive {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected