matcher.proto

Package: xds.type.matcher.v3

Types:

Source File: github.com/solo-io/gloo/projects/gloo/api/external/xds/type/matcher/v3/matcher.proto

Matcher

A matcher, which may traverse a matching tree in order to result in a match action. During matching, the tree will be traversed until a match is found, or if no match is found the action specified by the most specific on_no_match will be evaluated. As an on_no_match might result in another matching tree being evaluated, this process might repeat several times until the final OnMatch (or no match) is decided.

"matcherList": .xds.type.matcher.v3.Matcher.MatcherList
"matcherTree": .xds.type.matcher.v3.Matcher.MatcherTree
"onNoMatch": .xds.type.matcher.v3.Matcher.OnMatch

Field Type Description
matcherList .xds.type.matcher.v3.Matcher.MatcherList A linear list of matchers to evaluate. Only one of matcherList or matcherTree can be set.
matcherTree .xds.type.matcher.v3.Matcher.MatcherTree A match tree to evaluate. Only one of matcherTree or matcherList can be set.
onNoMatch .xds.type.matcher.v3.Matcher.OnMatch Optional OnMatch to use if no matcher above matched (e.g., if there are no matchers specified above, or if none of the matches specified above succeeded). If no matcher above matched and this field is not populated, the match will be considered unsuccessful.

OnMatch

What to do if a match is successful.

"matcher": .xds.type.matcher.v3.Matcher
"action": .xds.core.v3.TypedExtensionConfig

Field Type Description
matcher .xds.type.matcher.v3.Matcher Nested matcher to evaluate. If the nested matcher does not match and does not specify on_no_match, then this matcher is considered not to have matched, even if a predicate at this level or above returned true. Only one of matcher or action can be set.
action .xds.core.v3.TypedExtensionConfig Protocol-specific action to take. Only one of action or matcher can be set.

MatcherList

A linear list of field matchers. The field matchers are evaluated in order, and the first match wins.

"matchers": []xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher

Field Type Description
matchers []xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher A list of matchers. First match wins.

Predicate

Predicate to determine if a match is successful.

"singlePredicate": .xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate
"orMatcher": .xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList
"andMatcher": .xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList
"notMatcher": .xds.type.matcher.v3.Matcher.MatcherList.Predicate

Field Type Description
singlePredicate .xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate A single predicate to evaluate. Only one of singlePredicate, orMatcher, andMatcher, or notMatcher can be set.
orMatcher .xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList A list of predicates to be OR-ed together. Only one of orMatcher, singlePredicate, andMatcher, or notMatcher can be set.
andMatcher .xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList A list of predicates to be AND-ed together. Only one of andMatcher, singlePredicate, orMatcher, or notMatcher can be set.
notMatcher .xds.type.matcher.v3.Matcher.MatcherList.Predicate The invert of a predicate. Only one of notMatcher, singlePredicate, orMatcher, or andMatcher can be set.

SinglePredicate

Predicate for a single input field.

"input": .xds.core.v3.TypedExtensionConfig
"valueMatch": .xds.type.matcher.v3.StringMatcher
"customMatch": .xds.core.v3.TypedExtensionConfig

Field Type Description
input .xds.core.v3.TypedExtensionConfig Protocol-specific specification of input field to match on. [#extension-category: envoy.matching.common_inputs].
valueMatch .xds.type.matcher.v3.StringMatcher Built-in string matcher. Only one of valueMatch or customMatch can be set.
customMatch .xds.core.v3.TypedExtensionConfig Extension for custom matching logic. [#extension-category: envoy.matching.input_matchers]. Only one of customMatch or valueMatch can be set.

PredicateList

A list of two or more matchers. Used to allow using a list within a oneof.

"predicate": []xds.type.matcher.v3.Matcher.MatcherList.Predicate

Field Type Description
predicate []xds.type.matcher.v3.Matcher.MatcherList.Predicate

FieldMatcher

An individual matcher.

"predicate": .xds.type.matcher.v3.Matcher.MatcherList.Predicate
"onMatch": .xds.type.matcher.v3.Matcher.OnMatch

Field Type Description
predicate .xds.type.matcher.v3.Matcher.MatcherList.Predicate Determines if the match succeeds.
onMatch .xds.type.matcher.v3.Matcher.OnMatch What to do if the match succeeds.

MatcherTree

"input": .xds.core.v3.TypedExtensionConfig
"exactMatchMap": .xds.type.matcher.v3.Matcher.MatcherTree.MatchMap
"prefixMatchMap": .xds.type.matcher.v3.Matcher.MatcherTree.MatchMap
"customMatch": .xds.core.v3.TypedExtensionConfig

Field Type Description
input .xds.core.v3.TypedExtensionConfig Protocol-specific specification of input field to match on.
exactMatchMap .xds.type.matcher.v3.Matcher.MatcherTree.MatchMap Only one of exactMatchMap, prefixMatchMap, or customMatch can be set.
prefixMatchMap .xds.type.matcher.v3.Matcher.MatcherTree.MatchMap Longest matching prefix wins. Only one of prefixMatchMap, exactMatchMap, or customMatch can be set.
customMatch .xds.core.v3.TypedExtensionConfig Extension for custom matching logic. Only one of customMatch, exactMatchMap, or prefixMatchMap can be set.

MatchMap

A map of configured matchers. Used to allow using a map within a oneof.

"map": map<string, .xds.type.matcher.v3.Matcher.OnMatch>

Field Type Description
map map<string, .xds.type.matcher.v3.Matcher.OnMatch>