MCPcopy Create free account
hub / github.com/cortexproject/cortex / match

Function match

pkg/distributor/distributor_test.go:4076–4087  ·  view source on GitHub ↗
(labels []cortexpb.LabelAdapter, matchers []*labels.Matcher)

Source from the content-addressed store, hash-verified

4074}
4075
4076func match(labels []cortexpb.LabelAdapter, matchers []*labels.Matcher) bool {
4077outer:
4078 for _, matcher := range matchers {
4079 for _, labels := range labels {
4080 if matcher.Name == labels.Name && matcher.Matches(labels.Value) {
4081 continue outer
4082 }
4083 }
4084 return false
4085 }
4086 return true
4087}
4088
4089func TestDistributorValidation(t *testing.T) {
4090 t.Parallel()

Callers 4

QueryMethod · 0.85
QueryStreamMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected