Project: Gloo (Orchestration & Management / API Gateway)
File: matcher.proto.sk.md

title: "matcher.proto" weight: 5 <!-- Code generated by solo-kit. DO NOT EDIT. --> 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 onnomatch will be evaluated. As an onnomatch might result in another matching tree being evaluated, this process might repeat several times until the final OnMatch (or no match) is decided. ```yaml "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` | | A linear list of matchers to evaluate. Only one of `matcherList` or `matcherTree` can be set. | | `matcherTree` | | A match tree to evaluate. Only one of `matcherTree` or `matcherList` can be set. | | `onNoMatch` | | 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. | What to do if a match is successful. ```yaml "matcher": .xds.type.matcher.v3.Matcher "action": .xds.core.v3.TypedExtensionConfig ``` | Field | Type | Description | | -- | - | -- | | `matcher` | | Nested matcher to evaluate. If the nested matcher does not match and does not specify onnomatch, 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` | | Protocol-specific action to take. Only one of `action` or `matcher` can be set. | A linear list of field matchers. The field matchers are evaluated in order, and the first match wins. ```yaml "matchers": []xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher ``` | Field | Type | Description | | -- | - | -- | | `matchers` | | A list of matchers. First match wins. | Predicate to determine if a match is successful. ```yaml "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` | | A single predicate to

Only one of `singlePredicate`, `orMatcher`, `andMatcher`, or `notMatcher` can be set. | | `orMatcher` | | A list of predicates to be OR-ed together. Only one of `orMatcher`, `singlePredicate`, `andMatcher`, or `notMatcher` can be set. | | `andMatcher` | | A list of predicates to be AND-ed together. Only one of `andMatcher`, `singlePredicate`, `orMatcher`, or `notMatcher` can be set. | | `notMatcher` | | The invert of a predicate. Only one of `notMatcher`, `singlePredicate`, `orMatcher`, or `andMatcher` can be set. | Predicate for a single input field. ```yaml "input": .xds.core.v3.TypedExtensionConfig "valueMatch": .xds.type.matcher.v3.StringMatcher "customMatch": .xds.core.v3.TypedExtensionConfig ``` | Field | Type | Description | | -- | - | -- | | `input` | | Protocol-specific specification of input field to match on. [#extension-category: envoy.matching.common_inputs]. | | `valueMatch` | | Built-in string matcher. Only one of `valueMatch` or `customMatch` can be set. | | `customMatch` | | Extension for custom matching logic. [#extension-category: envoy.matching.input_matchers]. Only one of `customMatch` or `valueMatch` can be set. | A list of two or more matchers. Used to allow using a list within a oneof. ```yaml "predicate": []xds.type.matcher.v3.Matcher.MatcherList.Predicate ``` | Field | Type | Description | | -- | - | -- | | `predicate` | | | An individual matcher. ```yaml "predicate": .xds.type.matcher.v3.Matcher.MatcherList.Predicate "onMatch": .xds.type.matcher.v3.Matcher.OnMatch ``` | Field | Type | Description | | -- | - | -- | | `predicate` | | Determines if the match succeeds. | | `onMatch` | | What to do if the match succeeds. | ```yaml "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` | | Protocol-specific specification of input field to match on. | | `exactMatchMap` | | Only one of `exactMatchMap`, `prefixMatchMap`, or `customMatch` can be set. | | `prefixMatchMap` | | Longest matching prefix wins. Only one of `prefixMatchMap`, `exactMatchMap`, or `customMatch` can be set. | | `customMatch` | | Extension for custom matching logic. Only one of `customMatch`, `exactMatchMap`, or `prefixMatchMap` can be set. | A map of configured matchers. Used to allow using a map within a oneof. ```yaml "map": map<string, .xds.type.matcher.v3.Matcher.OnMatch> ``` | Field | Type | Description | | -- | - | -- | | `map` | `map<string, .xds.type.matcher.v3.Matcher.OnMatch>` | | <!-- Start of HubSpot Embed Code --> <script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/5130874.js"></script> <!-- End of HubSpot Embed Code -->