Debian Codegraph @

xds/type/matcher/v3/range.proto

raw
1 syntax = "proto3";
2
3 package xds.type.matcher.v3;
4
5 import "xds/type/v3/range.proto";
6 import "xds/type/matcher/v3/matcher.proto";
7
8 import "validate/validate.proto";
9
10 option java_package = "com.github.xds.type.matcher.v3";
11 option java_outer_classname = "RangeProto";
12 option java_multiple_files = true;
13 option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3";
14
15 // [#protodoc-title: Range matcher]
16
17 // Specifies a set of ranges for matching an int64 number and the associated
18 // match actions.
19 message Int64RangeMatcher {
20 // Specifies a list of number ranges and a match action.
21 message RangeMatcher {
22 // A non-empty set of int64 ranges.
23 repeated xds.type.v3.Int64Range ranges = 1
24 [(validate.rules).repeated = { min_items: 1 }];
25
26 // Match action to apply when the input number is within one of the ranges.
27 Matcher.OnMatch on_match = 2;
28 }
29
30 // Match a number by a list of number ranges. If multiple ranges contain the
31 // input number, then the first action in this list is taken.
32 repeated RangeMatcher range_matchers = 1;
33 }
34
35 // Specifies a set of ranges for matching an int32 number and the associated
36 // match actions.
37 message Int32RangeMatcher {
38 // Specifies a list of number ranges and a match action.
39 message RangeMatcher {
40 // A non-empty set of int32 ranges.
41 repeated xds.type.v3.Int32Range ranges = 1
42 [(validate.rules).repeated = { min_items: 1 }];
43
44 // Match action to apply when the input number is within one of the ranges.
45 Matcher.OnMatch on_match = 2;
46 }
47
48 // Match a number by a list of number ranges. If multiple ranges contain the
49 // input number, then the first action in this list is taken.
50 repeated RangeMatcher range_matchers = 1;
51 }
52
53 // Specifies a set of ranges for matching a double number and the associated
54 // match actions.
55 message DoubleRangeMatcher {
56 // Specifies a list of number ranges and a match action.
57 message RangeMatcher {
58 // A non-empty set of double ranges.
59 repeated xds.type.v3.DoubleRange ranges = 1
60 [(validate.rules).repeated = { min_items: 1 }];
61
62 // Match action to apply when the input number is within one of the ranges.
63 Matcher.OnMatch on_match = 2;
64 }
65
66 // Match a number by a list of number ranges. If multiple ranges contain the
67 // input number, then the first action in this list is taken.
68 repeated RangeMatcher range_matchers = 1;
69 }