Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matchers: clarify range matcher #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 49 additions & 47 deletions go/xds/type/matcher/v3/range.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions go/xds/type/matcher/v3/range.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 15 additions & 9 deletions xds/type/matcher/v3/range.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ message Int64RangeMatcher {
Matcher.OnMatch on_match = 2;
}

// Match a number by a list of number ranges. If multiple ranges contain the
// input number, then the first action in this list is taken.
repeated RangeMatcher range_matchers = 1;
// Match a number by a list of number ranges. If multiple range matchers
// contain the input number and match recursively, then the first matcher in
// this list is taken.
repeated RangeMatcher range_matchers = 1
[(validate.rules).repeated = { min_items: 1 }];
}

// Specifies a set of ranges for matching an int32 number and the associated
Expand All @@ -45,9 +47,11 @@ message Int32RangeMatcher {
Matcher.OnMatch on_match = 2;
}

// Match a number by a list of number ranges. If multiple ranges contain the
// input number, then the first action in this list is taken.
repeated RangeMatcher range_matchers = 1;
// Match a number by a list of number ranges. If multiple range matchers
// contain the input number and match recursively, then the first matcher in
// this list is taken.
repeated RangeMatcher range_matchers = 1
[(validate.rules).repeated = { min_items: 1 }];
}

// Specifies a set of ranges for matching a double number and the associated
Expand All @@ -63,7 +67,9 @@ message DoubleRangeMatcher {
Matcher.OnMatch on_match = 2;
}

// Match a number by a list of number ranges. If multiple ranges contain the
// input number, then the first action in this list is taken.
repeated RangeMatcher range_matchers = 1;
// Match a number by a list of number ranges. If multiple range matchers
// contain the input number and match recursively, then the first matcher in
// this list is taken.
repeated RangeMatcher range_matchers = 1
[(validate.rules).repeated = { min_items: 1 }];
}