async-grpc-xds 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/fixtures/async/grpc/test_interface.rb +79 -0
- data/fixtures/async/grpc/test_message.rb +56 -0
- data/lib/async/grpc/xds/ads_stream.rb +70 -0
- data/lib/async/grpc/xds/client.rb +255 -0
- data/lib/async/grpc/xds/context.rb +201 -0
- data/lib/async/grpc/xds/control_plane.rb +143 -0
- data/lib/async/grpc/xds/discovery_client.rb +356 -0
- data/lib/async/grpc/xds/health_checker.rb +88 -0
- data/lib/async/grpc/xds/load_balancer.rb +196 -0
- data/lib/async/grpc/xds/resource_builder.rb +138 -0
- data/lib/async/grpc/xds/resource_cache.rb +55 -0
- data/lib/async/grpc/xds/resources.rb +270 -0
- data/lib/async/grpc/xds/server.rb +34 -0
- data/lib/async/grpc/xds/service.rb +117 -0
- data/lib/async/grpc/xds/version.rb +12 -0
- data/lib/async/grpc/xds.rb +42 -0
- data/lib/envoy/annotations/deprecation_pb.rb +19 -0
- data/lib/envoy/config/cluster/v3/circuit_breaker_pb.rb +31 -0
- data/lib/envoy/config/cluster/v3/cluster_pb.rb +80 -0
- data/lib/envoy/config/cluster/v3/filter_pb.rb +28 -0
- data/lib/envoy/config/cluster/v3/outlier_detection_pb.rb +29 -0
- data/lib/envoy/config/core/v3/address_pb.rb +38 -0
- data/lib/envoy/config/core/v3/backoff_pb.rb +27 -0
- data/lib/envoy/config/core/v3/base_pb.rb +68 -0
- data/lib/envoy/config/core/v3/cel_pb.rb +24 -0
- data/lib/envoy/config/core/v3/config_source_pb.rb +42 -0
- data/lib/envoy/config/core/v3/event_service_config_pb.rb +27 -0
- data/lib/envoy/config/core/v3/extension_pb.rb +26 -0
- data/lib/envoy/config/core/v3/grpc_method_list_pb.rb +27 -0
- data/lib/envoy/config/core/v3/grpc_service_pb.rb +45 -0
- data/lib/envoy/config/core/v3/health_check_pb.rb +47 -0
- data/lib/envoy/config/core/v3/http_service_pb.rb +27 -0
- data/lib/envoy/config/core/v3/http_uri_pb.rb +27 -0
- data/lib/envoy/config/core/v3/protocol_pb.rb +51 -0
- data/lib/envoy/config/core/v3/proxy_protocol_pb.rb +31 -0
- data/lib/envoy/config/core/v3/resolver_pb.rb +27 -0
- data/lib/envoy/config/core/v3/socket_cmsg_headers_pb.rb +25 -0
- data/lib/envoy/config/core/v3/socket_option_pb.rb +31 -0
- data/lib/envoy/config/core/v3/substitution_format_string_pb.rb +30 -0
- data/lib/envoy/config/core/v3/udp_socket_config_pb.rb +26 -0
- data/lib/envoy/config/endpoint/v3/endpoint_components_pb.rb +40 -0
- data/lib/envoy/config/endpoint/v3/endpoint_pb.rb +32 -0
- data/lib/envoy/config/endpoint/v3/load_report_pb.rb +36 -0
- data/lib/envoy/service/discovery/v3/ads_pb.rb +26 -0
- data/lib/envoy/service/discovery/v3/aggregated_discovery_service.rb +64 -0
- data/lib/envoy/service/discovery/v3/discovery_pb.rb +42 -0
- data/lib/envoy/type/matcher/v3/address_pb.rb +25 -0
- data/lib/envoy/type/matcher/v3/filter_state_pb.rb +27 -0
- data/lib/envoy/type/matcher/v3/http_inputs_pb.rb +29 -0
- data/lib/envoy/type/matcher/v3/metadata_pb.rb +28 -0
- data/lib/envoy/type/matcher/v3/node_pb.rb +27 -0
- data/lib/envoy/type/matcher/v3/number_pb.rb +27 -0
- data/lib/envoy/type/matcher/v3/path_pb.rb +27 -0
- data/lib/envoy/type/matcher/v3/regex_pb.rb +30 -0
- data/lib/envoy/type/matcher/v3/status_code_input_pb.rb +25 -0
- data/lib/envoy/type/matcher/v3/string_pb.rb +29 -0
- data/lib/envoy/type/matcher/v3/struct_pb.rb +28 -0
- data/lib/envoy/type/matcher/v3/value_pb.rb +31 -0
- data/lib/envoy/type/metadata/v3/metadata_pb.rb +32 -0
- data/lib/envoy/type/v3/hash_policy_pb.rb +26 -0
- data/lib/envoy/type/v3/http_pb.rb +22 -0
- data/lib/envoy/type/v3/http_status_pb.rb +25 -0
- data/lib/envoy/type/v3/percent_pb.rb +26 -0
- data/lib/envoy/type/v3/range_pb.rb +25 -0
- data/lib/envoy/type/v3/ratelimit_strategy_pb.rb +28 -0
- data/lib/envoy/type/v3/ratelimit_unit_pb.rb +22 -0
- data/lib/envoy/type/v3/semantic_version_pb.rb +23 -0
- data/lib/envoy/type/v3/token_bucket_pb.rb +26 -0
- data/lib/envoy.rb +83 -0
- data/lib/google/protobuf/any_pb.rb +18 -0
- data/lib/google/protobuf/duration_pb.rb +18 -0
- data/lib/google/protobuf/empty_pb.rb +18 -0
- data/lib/google/protobuf/struct_pb.rb +21 -0
- data/lib/google/protobuf/timestamp_pb.rb +18 -0
- data/lib/google/protobuf/wrappers_pb.rb +26 -0
- data/lib/google/rpc/status_pb.rb +20 -0
- data/lib/udpa/annotations/migrate_pb.rb +22 -0
- data/lib/udpa/annotations/security_pb.rb +23 -0
- data/lib/udpa/annotations/sensitive_pb.rb +19 -0
- data/lib/udpa/annotations/status_pb.rb +21 -0
- data/lib/udpa/annotations/versioning_pb.rb +20 -0
- data/lib/validate/validate_pb.rb +43 -0
- data/lib/xds/annotations/v3/status_pb.rb +26 -0
- data/lib/xds/core/v3/authority_pb.rb +23 -0
- data/lib/xds/core/v3/cidr_pb.rb +24 -0
- data/lib/xds/core/v3/collection_entry_pb.rb +26 -0
- data/lib/xds/core/v3/context_params_pb.rb +22 -0
- data/lib/xds/core/v3/extension_pb.rb +23 -0
- data/lib/xds/core/v3/resource_locator_pb.rb +26 -0
- data/lib/xds/core/v3/resource_name_pb.rb +24 -0
- data/lib/xds/core/v3/resource_pb.rb +24 -0
- data/lib/xds/type/matcher/v3/domain_pb.rb +27 -0
- data/lib/xds/type/matcher/v3/http_inputs_pb.rb +22 -0
- data/lib/xds/type/matcher/v3/ip_pb.rb +28 -0
- data/lib/xds/type/matcher/v3/matcher_pb.rb +34 -0
- data/lib/xds/type/matcher/v3/range_pb.rb +31 -0
- data/lib/xds/type/matcher/v3/regex_pb.rb +25 -0
- data/lib/xds/type/matcher/v3/string_pb.rb +27 -0
- data/license.md +21 -0
- data/plan.md +156 -0
- data/proto/envoy/annotations/deprecation.proto +34 -0
- data/proto/envoy/annotations/resource.proto +19 -0
- data/proto/envoy/config/README.md +3 -0
- data/proto/envoy/config/cluster/v3/BUILD +18 -0
- data/proto/envoy/config/cluster/v3/circuit_breaker.proto +121 -0
- data/proto/envoy/config/cluster/v3/cluster.proto +1407 -0
- data/proto/envoy/config/cluster/v3/filter.proto +40 -0
- data/proto/envoy/config/cluster/v3/outlier_detection.proto +180 -0
- data/proto/envoy/config/core/v3/BUILD +16 -0
- data/proto/envoy/config/core/v3/address.proto +214 -0
- data/proto/envoy/config/core/v3/backoff.proto +37 -0
- data/proto/envoy/config/core/v3/base.proto +662 -0
- data/proto/envoy/config/core/v3/cel.proto +63 -0
- data/proto/envoy/config/core/v3/config_source.proto +283 -0
- data/proto/envoy/config/core/v3/event_service_config.proto +29 -0
- data/proto/envoy/config/core/v3/extension.proto +32 -0
- data/proto/envoy/config/core/v3/grpc_method_list.proto +33 -0
- data/proto/envoy/config/core/v3/grpc_service.proto +355 -0
- data/proto/envoy/config/core/v3/health_check.proto +443 -0
- data/proto/envoy/config/core/v3/http_service.proto +35 -0
- data/proto/envoy/config/core/v3/http_uri.proto +58 -0
- data/proto/envoy/config/core/v3/protocol.proto +807 -0
- data/proto/envoy/config/core/v3/proxy_protocol.proto +114 -0
- data/proto/envoy/config/core/v3/resolver.proto +36 -0
- data/proto/envoy/config/core/v3/socket_cmsg_headers.proto +28 -0
- data/proto/envoy/config/core/v3/socket_option.proto +108 -0
- data/proto/envoy/config/core/v3/substitution_format_string.proto +136 -0
- data/proto/envoy/config/core/v3/udp_socket_config.proto +32 -0
- data/proto/envoy/config/endpoint/v3/BUILD +16 -0
- data/proto/envoy/config/endpoint/v3/endpoint.proto +137 -0
- data/proto/envoy/config/endpoint/v3/endpoint_components.proto +229 -0
- data/proto/envoy/config/endpoint/v3/load_report.proto +220 -0
- data/proto/envoy/config/listener/v3/BUILD +18 -0
- data/proto/envoy/config/listener/v3/api_listener.proto +34 -0
- data/proto/envoy/config/listener/v3/listener.proto +455 -0
- data/proto/envoy/config/listener/v3/listener_components.proto +353 -0
- data/proto/envoy/config/listener/v3/quic_config.proto +108 -0
- data/proto/envoy/config/listener/v3/udp_listener_config.proto +52 -0
- data/proto/envoy/config/route/v3/BUILD +19 -0
- data/proto/envoy/config/route/v3/route.proto +172 -0
- data/proto/envoy/config/route/v3/route_components.proto +2918 -0
- data/proto/envoy/config/route/v3/scoped_route.proto +133 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/BUILD +14 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/cert.proto +12 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/common.proto +597 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/secret.proto +61 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/tls.proto +366 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto +67 -0
- data/proto/envoy/service/README.md +3 -0
- data/proto/envoy/service/discovery/v3/BUILD +13 -0
- data/proto/envoy/service/discovery/v3/ads.proto +44 -0
- data/proto/envoy/service/discovery/v3/discovery.proto +443 -0
- data/proto/envoy/type/BUILD +9 -0
- data/proto/envoy/type/hash_policy.proto +28 -0
- data/proto/envoy/type/http.proto +24 -0
- data/proto/envoy/type/http_status.proto +140 -0
- data/proto/envoy/type/matcher/v3/address.proto +22 -0
- data/proto/envoy/type/matcher/v3/filter_state.proto +33 -0
- data/proto/envoy/type/matcher/v3/http_inputs.proto +71 -0
- data/proto/envoy/type/matcher/v3/metadata.proto +110 -0
- data/proto/envoy/type/matcher/v3/node.proto +29 -0
- data/proto/envoy/type/matcher/v3/number.proto +33 -0
- data/proto/envoy/type/matcher/v3/path.proto +31 -0
- data/proto/envoy/type/matcher/v3/regex.proto +97 -0
- data/proto/envoy/type/matcher/v3/status_code_input.proto +23 -0
- data/proto/envoy/type/matcher/v3/string.proto +94 -0
- data/proto/envoy/type/matcher/v3/struct.proto +91 -0
- data/proto/envoy/type/matcher/v3/value.proto +80 -0
- data/proto/envoy/type/metadata/v3/metadata.proto +117 -0
- data/proto/envoy/type/percent.proto +52 -0
- data/proto/envoy/type/range.proto +43 -0
- data/proto/envoy/type/semantic_version.proto +24 -0
- data/proto/envoy/type/token_bucket.proto +36 -0
- data/proto/envoy/type/v3/BUILD +12 -0
- data/proto/envoy/type/v3/hash_policy.proto +43 -0
- data/proto/envoy/type/v3/http.proto +24 -0
- data/proto/envoy/type/v3/http_status.proto +199 -0
- data/proto/envoy/type/v3/percent.proto +57 -0
- data/proto/envoy/type/v3/range.proto +50 -0
- data/proto/envoy/type/v3/ratelimit_strategy.proto +79 -0
- data/proto/envoy/type/v3/ratelimit_unit.proto +37 -0
- data/proto/envoy/type/v3/semantic_version.proto +27 -0
- data/proto/envoy/type/v3/token_bucket.proto +39 -0
- data/proto/google/protobuf/any.proto +162 -0
- data/proto/google/protobuf/duration.proto +115 -0
- data/proto/google/protobuf/empty.proto +51 -0
- data/proto/google/protobuf/struct.proto +95 -0
- data/proto/google/protobuf/timestamp.proto +145 -0
- data/proto/google/protobuf/wrappers.proto +157 -0
- data/proto/google/rpc/status.proto +47 -0
- data/proto/readme.md +70 -0
- data/proto/udpa/annotations/migrate.proto +49 -0
- data/proto/udpa/annotations/security.proto +31 -0
- data/proto/udpa/annotations/sensitive.proto +14 -0
- data/proto/udpa/annotations/status.proto +34 -0
- data/proto/udpa/annotations/versioning.proto +17 -0
- data/proto/validate/validate.proto +862 -0
- data/proto/xds/annotations/v3/migrate.proto +46 -0
- data/proto/xds/annotations/v3/security.proto +30 -0
- data/proto/xds/annotations/v3/sensitive.proto +16 -0
- data/proto/xds/annotations/v3/status.proto +59 -0
- data/proto/xds/annotations/v3/versioning.proto +20 -0
- data/proto/xds/core/v3/authority.proto +22 -0
- data/proto/xds/core/v3/cidr.proto +25 -0
- data/proto/xds/core/v3/collection_entry.proto +55 -0
- data/proto/xds/core/v3/context_params.proto +23 -0
- data/proto/xds/core/v3/extension.proto +26 -0
- data/proto/xds/core/v3/resource.proto +29 -0
- data/proto/xds/core/v3/resource_locator.proto +118 -0
- data/proto/xds/core/v3/resource_name.proto +42 -0
- data/proto/xds/type/matcher/v3/cel.proto +37 -0
- data/proto/xds/type/matcher/v3/domain.proto +46 -0
- data/proto/xds/type/matcher/v3/http_inputs.proto +23 -0
- data/proto/xds/type/matcher/v3/ip.proto +53 -0
- data/proto/xds/type/matcher/v3/matcher.proto +144 -0
- data/proto/xds/type/matcher/v3/range.proto +69 -0
- data/proto/xds/type/matcher/v3/regex.proto +46 -0
- data/proto/xds/type/matcher/v3/string.proto +71 -0
- data/proto/xds/type/v3/cel.proto +77 -0
- data/proto/xds/type/v3/range.proto +40 -0
- data/proto/xds/type/v3/typed_struct.proto +44 -0
- data/readme.md +37 -0
- data/releases.md +5 -0
- data/xds/Dockerfile.backend +24 -0
- data/xds/Dockerfile.control-plane +22 -0
- data/xds/backend_server.rb +68 -0
- data/xds/docker-compose.yaml +89 -0
- data/xds/go.mod +22 -0
- data/xds/go.sum +82 -0
- data/xds/readme.md +122 -0
- data/xds/test/async/grpc/xds/client.rb +294 -0
- data/xds/test/async/grpc/xds/control_plane.rb +94 -0
- data/xds/test_server.go +355 -0
- data/xds/update_protos.sh +123 -0
- data.tar.gz.sig +0 -0
- metadata +386 -0
- metadata.gz.sig +2 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type.matcher.v3;
|
|
4
|
+
|
|
5
|
+
import "envoy/type/matcher/v3/number.proto";
|
|
6
|
+
import "envoy/type/matcher/v3/string.proto";
|
|
7
|
+
|
|
8
|
+
import "udpa/annotations/status.proto";
|
|
9
|
+
import "udpa/annotations/versioning.proto";
|
|
10
|
+
import "validate/validate.proto";
|
|
11
|
+
|
|
12
|
+
option java_package = "io.envoyproxy.envoy.type.matcher.v3";
|
|
13
|
+
option java_outer_classname = "ValueProto";
|
|
14
|
+
option java_multiple_files = true;
|
|
15
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3";
|
|
16
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
17
|
+
|
|
18
|
+
// [#protodoc-title: Value matcher]
|
|
19
|
+
|
|
20
|
+
// Specifies the way to match a Protobuf::Value. Primitive values and ListValue are supported.
|
|
21
|
+
// StructValue is not supported and is always not matched.
|
|
22
|
+
// [#next-free-field: 8]
|
|
23
|
+
message ValueMatcher {
|
|
24
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.ValueMatcher";
|
|
25
|
+
|
|
26
|
+
// NullMatch is an empty message to specify a null value.
|
|
27
|
+
message NullMatch {
|
|
28
|
+
option (udpa.annotations.versioning).previous_message_type =
|
|
29
|
+
"envoy.type.matcher.ValueMatcher.NullMatch";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Specifies how to match a value.
|
|
33
|
+
oneof match_pattern {
|
|
34
|
+
option (validate.required) = true;
|
|
35
|
+
|
|
36
|
+
// If specified, a match occurs if and only if the target value is a NullValue.
|
|
37
|
+
NullMatch null_match = 1;
|
|
38
|
+
|
|
39
|
+
// If specified, a match occurs if and only if the target value is a double value and is
|
|
40
|
+
// matched to this field.
|
|
41
|
+
DoubleMatcher double_match = 2;
|
|
42
|
+
|
|
43
|
+
// If specified, a match occurs if and only if the target value is a string value and is
|
|
44
|
+
// matched to this field.
|
|
45
|
+
StringMatcher string_match = 3;
|
|
46
|
+
|
|
47
|
+
// If specified, a match occurs if and only if the target value is a bool value and is equal
|
|
48
|
+
// to this field.
|
|
49
|
+
bool bool_match = 4;
|
|
50
|
+
|
|
51
|
+
// If specified, value match will be performed based on whether the path is referring to a
|
|
52
|
+
// valid primitive value in the metadata. If the path is referring to a non-primitive value,
|
|
53
|
+
// the result is always not matched.
|
|
54
|
+
bool present_match = 5;
|
|
55
|
+
|
|
56
|
+
// If specified, a match occurs if and only if the target value is a list value and
|
|
57
|
+
// is matched to this field.
|
|
58
|
+
ListMatcher list_match = 6;
|
|
59
|
+
|
|
60
|
+
// If specified, a match occurs if and only if any of the alternatives in the match accept the value.
|
|
61
|
+
OrMatcher or_match = 7;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Specifies the way to match a list value.
|
|
66
|
+
message ListMatcher {
|
|
67
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.ListMatcher";
|
|
68
|
+
|
|
69
|
+
oneof match_pattern {
|
|
70
|
+
option (validate.required) = true;
|
|
71
|
+
|
|
72
|
+
// If specified, at least one of the values in the list must match the value specified.
|
|
73
|
+
ValueMatcher one_of = 1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Specifies a list of alternatives for the match.
|
|
78
|
+
message OrMatcher {
|
|
79
|
+
repeated ValueMatcher value_matchers = 1 [(validate.rules).repeated = {min_items: 2}];
|
|
80
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type.metadata.v3;
|
|
4
|
+
|
|
5
|
+
import "udpa/annotations/status.proto";
|
|
6
|
+
import "udpa/annotations/versioning.proto";
|
|
7
|
+
import "validate/validate.proto";
|
|
8
|
+
|
|
9
|
+
option java_package = "io.envoyproxy.envoy.type.metadata.v3";
|
|
10
|
+
option java_outer_classname = "MetadataProto";
|
|
11
|
+
option java_multiple_files = true;
|
|
12
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3;metadatav3";
|
|
13
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
14
|
+
|
|
15
|
+
// [#protodoc-title: Metadata]
|
|
16
|
+
|
|
17
|
+
// MetadataKey provides a way to retrieve values from
|
|
18
|
+
// :ref:`Metadata <envoy_v3_api_msg_config.core.v3.Metadata>` using a ``key`` and a ``path``.
|
|
19
|
+
//
|
|
20
|
+
// For example, consider the following Metadata:
|
|
21
|
+
//
|
|
22
|
+
// .. code-block:: yaml
|
|
23
|
+
//
|
|
24
|
+
// filter_metadata:
|
|
25
|
+
// envoy.xxx:
|
|
26
|
+
// prop:
|
|
27
|
+
// foo: bar
|
|
28
|
+
// xyz:
|
|
29
|
+
// hello: envoy
|
|
30
|
+
//
|
|
31
|
+
// The following MetadataKey would retrieve the string value "bar" from the Metadata:
|
|
32
|
+
//
|
|
33
|
+
// .. code-block:: yaml
|
|
34
|
+
//
|
|
35
|
+
// key: envoy.xxx
|
|
36
|
+
// path:
|
|
37
|
+
// - key: prop
|
|
38
|
+
// - key: foo
|
|
39
|
+
//
|
|
40
|
+
message MetadataKey {
|
|
41
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.metadata.v2.MetadataKey";
|
|
42
|
+
|
|
43
|
+
// Specifies a segment in a path for retrieving values from Metadata.
|
|
44
|
+
// Currently, only key-based segments (field names) are supported.
|
|
45
|
+
message PathSegment {
|
|
46
|
+
option (udpa.annotations.versioning).previous_message_type =
|
|
47
|
+
"envoy.type.metadata.v2.MetadataKey.PathSegment";
|
|
48
|
+
|
|
49
|
+
oneof segment {
|
|
50
|
+
option (validate.required) = true;
|
|
51
|
+
|
|
52
|
+
// If specified, use this key to retrieve the value in a Struct.
|
|
53
|
+
string key = 1 [(validate.rules).string = {min_len: 1}];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// The key name of the Metadata from which to retrieve the Struct.
|
|
58
|
+
// This typically represents a builtin subsystem or custom extension.
|
|
59
|
+
string key = 1 [(validate.rules).string = {min_len: 1}];
|
|
60
|
+
|
|
61
|
+
// The path used to retrieve a specific Value from the Struct.
|
|
62
|
+
// This can be either a prefix or a full path, depending on the use case.
|
|
63
|
+
// For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string
|
|
64
|
+
// in the example above.
|
|
65
|
+
//
|
|
66
|
+
// .. note::
|
|
67
|
+
// Since only key-type segments are supported, a path cannot specify a list
|
|
68
|
+
// unless the list is the last segment.
|
|
69
|
+
repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Describes different types of metadata sources.
|
|
73
|
+
message MetadataKind {
|
|
74
|
+
option (udpa.annotations.versioning).previous_message_type =
|
|
75
|
+
"envoy.type.metadata.v2.MetadataKind";
|
|
76
|
+
|
|
77
|
+
// Represents dynamic metadata associated with the request.
|
|
78
|
+
message Request {
|
|
79
|
+
option (udpa.annotations.versioning).previous_message_type =
|
|
80
|
+
"envoy.type.metadata.v2.MetadataKind.Request";
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Represents metadata from :ref:`the route<envoy_v3_api_field_config.route.v3.Route.metadata>`.
|
|
84
|
+
message Route {
|
|
85
|
+
option (udpa.annotations.versioning).previous_message_type =
|
|
86
|
+
"envoy.type.metadata.v2.MetadataKind.Route";
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Represents metadata from :ref:`the upstream cluster<envoy_v3_api_field_config.cluster.v3.Cluster.metadata>`.
|
|
90
|
+
message Cluster {
|
|
91
|
+
option (udpa.annotations.versioning).previous_message_type =
|
|
92
|
+
"envoy.type.metadata.v2.MetadataKind.Cluster";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Represents metadata from :ref:`the upstream
|
|
96
|
+
// host<envoy_v3_api_field_config.endpoint.v3.LbEndpoint.metadata>`.
|
|
97
|
+
message Host {
|
|
98
|
+
option (udpa.annotations.versioning).previous_message_type =
|
|
99
|
+
"envoy.type.metadata.v2.MetadataKind.Host";
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
oneof kind {
|
|
103
|
+
option (validate.required) = true;
|
|
104
|
+
|
|
105
|
+
// Request kind of metadata.
|
|
106
|
+
Request request = 1;
|
|
107
|
+
|
|
108
|
+
// Route kind of metadata.
|
|
109
|
+
Route route = 2;
|
|
110
|
+
|
|
111
|
+
// Cluster kind of metadata.
|
|
112
|
+
Cluster cluster = 3;
|
|
113
|
+
|
|
114
|
+
// Host kind of metadata.
|
|
115
|
+
Host host = 4;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type;
|
|
4
|
+
|
|
5
|
+
import "udpa/annotations/status.proto";
|
|
6
|
+
import "validate/validate.proto";
|
|
7
|
+
|
|
8
|
+
option java_package = "io.envoyproxy.envoy.type";
|
|
9
|
+
option java_outer_classname = "PercentProto";
|
|
10
|
+
option java_multiple_files = true;
|
|
11
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type";
|
|
12
|
+
option (udpa.annotations.file_status).package_version_status = FROZEN;
|
|
13
|
+
|
|
14
|
+
// [#protodoc-title: Percent]
|
|
15
|
+
|
|
16
|
+
// Identifies a percentage, in the range [0.0, 100.0].
|
|
17
|
+
message Percent {
|
|
18
|
+
double value = 1 [(validate.rules).double = {lte: 100.0 gte: 0.0}];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// A fractional percentage is used in cases in which for performance reasons performing floating
|
|
22
|
+
// point to integer conversions during randomness calculations is undesirable. The message includes
|
|
23
|
+
// both a numerator and denominator that together determine the final fractional value.
|
|
24
|
+
//
|
|
25
|
+
// * **Example**: 1/100 = 1%.
|
|
26
|
+
// * **Example**: 3/10000 = 0.03%.
|
|
27
|
+
message FractionalPercent {
|
|
28
|
+
// Fraction percentages support several fixed denominator values.
|
|
29
|
+
enum DenominatorType {
|
|
30
|
+
// 100.
|
|
31
|
+
//
|
|
32
|
+
// **Example**: 1/100 = 1%.
|
|
33
|
+
HUNDRED = 0;
|
|
34
|
+
|
|
35
|
+
// 10,000.
|
|
36
|
+
//
|
|
37
|
+
// **Example**: 1/10000 = 0.01%.
|
|
38
|
+
TEN_THOUSAND = 1;
|
|
39
|
+
|
|
40
|
+
// 1,000,000.
|
|
41
|
+
//
|
|
42
|
+
// **Example**: 1/1000000 = 0.0001%.
|
|
43
|
+
MILLION = 2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Specifies the numerator. Defaults to 0.
|
|
47
|
+
uint32 numerator = 1;
|
|
48
|
+
|
|
49
|
+
// Specifies the denominator. If the denominator specified is less than the numerator, the final
|
|
50
|
+
// fractional percentage is capped at 1 (100%).
|
|
51
|
+
DenominatorType denominator = 2 [(validate.rules).enum = {defined_only: true}];
|
|
52
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type;
|
|
4
|
+
|
|
5
|
+
import "udpa/annotations/status.proto";
|
|
6
|
+
|
|
7
|
+
option java_package = "io.envoyproxy.envoy.type";
|
|
8
|
+
option java_outer_classname = "RangeProto";
|
|
9
|
+
option java_multiple_files = true;
|
|
10
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type";
|
|
11
|
+
option (udpa.annotations.file_status).package_version_status = FROZEN;
|
|
12
|
+
|
|
13
|
+
// [#protodoc-title: Range]
|
|
14
|
+
|
|
15
|
+
// Specifies the int64 start and end of the range using half-open interval semantics [start,
|
|
16
|
+
// end).
|
|
17
|
+
message Int64Range {
|
|
18
|
+
// start of the range (inclusive)
|
|
19
|
+
int64 start = 1;
|
|
20
|
+
|
|
21
|
+
// end of the range (exclusive)
|
|
22
|
+
int64 end = 2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Specifies the int32 start and end of the range using half-open interval semantics [start,
|
|
26
|
+
// end).
|
|
27
|
+
message Int32Range {
|
|
28
|
+
// start of the range (inclusive)
|
|
29
|
+
int32 start = 1;
|
|
30
|
+
|
|
31
|
+
// end of the range (exclusive)
|
|
32
|
+
int32 end = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Specifies the double start and end of the range using half-open interval semantics [start,
|
|
36
|
+
// end).
|
|
37
|
+
message DoubleRange {
|
|
38
|
+
// start of the range (inclusive)
|
|
39
|
+
double start = 1;
|
|
40
|
+
|
|
41
|
+
// end of the range (exclusive)
|
|
42
|
+
double end = 2;
|
|
43
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type;
|
|
4
|
+
|
|
5
|
+
import "udpa/annotations/status.proto";
|
|
6
|
+
|
|
7
|
+
option java_package = "io.envoyproxy.envoy.type";
|
|
8
|
+
option java_outer_classname = "SemanticVersionProto";
|
|
9
|
+
option java_multiple_files = true;
|
|
10
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type";
|
|
11
|
+
option (udpa.annotations.file_status).package_version_status = FROZEN;
|
|
12
|
+
|
|
13
|
+
// [#protodoc-title: Semantic Version]
|
|
14
|
+
|
|
15
|
+
// Envoy uses SemVer (https://semver.org/). Major/minor versions indicate
|
|
16
|
+
// expected behaviors and APIs, the patch version field is used only
|
|
17
|
+
// for security fixes and can be generally ignored.
|
|
18
|
+
message SemanticVersion {
|
|
19
|
+
uint32 major_number = 1;
|
|
20
|
+
|
|
21
|
+
uint32 minor_number = 2;
|
|
22
|
+
|
|
23
|
+
uint32 patch = 3;
|
|
24
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/duration.proto";
|
|
6
|
+
import "google/protobuf/wrappers.proto";
|
|
7
|
+
|
|
8
|
+
import "udpa/annotations/status.proto";
|
|
9
|
+
import "validate/validate.proto";
|
|
10
|
+
|
|
11
|
+
option java_package = "io.envoyproxy.envoy.type";
|
|
12
|
+
option java_outer_classname = "TokenBucketProto";
|
|
13
|
+
option java_multiple_files = true;
|
|
14
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type";
|
|
15
|
+
option (udpa.annotations.file_status).package_version_status = FROZEN;
|
|
16
|
+
|
|
17
|
+
// [#protodoc-title: Token bucket]
|
|
18
|
+
|
|
19
|
+
// Configures a token bucket, typically used for rate limiting.
|
|
20
|
+
message TokenBucket {
|
|
21
|
+
// The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket
|
|
22
|
+
// initially contains.
|
|
23
|
+
uint32 max_tokens = 1 [(validate.rules).uint32 = {gt: 0}];
|
|
24
|
+
|
|
25
|
+
// The number of tokens added to the bucket during each fill interval. If not specified, defaults
|
|
26
|
+
// to a single token.
|
|
27
|
+
google.protobuf.UInt32Value tokens_per_fill = 2 [(validate.rules).uint32 = {gt: 0}];
|
|
28
|
+
|
|
29
|
+
// The fill interval that tokens are added to the bucket. During each fill interval
|
|
30
|
+
// `tokens_per_fill` are added to the bucket. The bucket will never contain more than
|
|
31
|
+
// `max_tokens` tokens.
|
|
32
|
+
google.protobuf.Duration fill_interval = 3 [(validate.rules).duration = {
|
|
33
|
+
required: true
|
|
34
|
+
gt {}
|
|
35
|
+
}];
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
|
|
2
|
+
|
|
3
|
+
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
|
|
4
|
+
|
|
5
|
+
licenses(["notice"]) # Apache 2
|
|
6
|
+
|
|
7
|
+
api_proto_package(
|
|
8
|
+
deps = [
|
|
9
|
+
"@com_github_cncf_xds//udpa/annotations:pkg",
|
|
10
|
+
"@com_github_cncf_xds//xds/annotations/v3:pkg",
|
|
11
|
+
],
|
|
12
|
+
)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type.v3;
|
|
4
|
+
|
|
5
|
+
import "udpa/annotations/status.proto";
|
|
6
|
+
import "udpa/annotations/versioning.proto";
|
|
7
|
+
import "validate/validate.proto";
|
|
8
|
+
|
|
9
|
+
option java_package = "io.envoyproxy.envoy.type.v3";
|
|
10
|
+
option java_outer_classname = "HashPolicyProto";
|
|
11
|
+
option java_multiple_files = true;
|
|
12
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3";
|
|
13
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
14
|
+
|
|
15
|
+
// [#protodoc-title: Hash Policy]
|
|
16
|
+
|
|
17
|
+
// Specifies the hash policy
|
|
18
|
+
message HashPolicy {
|
|
19
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.HashPolicy";
|
|
20
|
+
|
|
21
|
+
// The source IP will be used to compute the hash used by hash-based load balancing
|
|
22
|
+
// algorithms.
|
|
23
|
+
message SourceIp {
|
|
24
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.HashPolicy.SourceIp";
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// An Object in the :ref:`filterState <arch_overview_data_sharing_between_filters>` will be used
|
|
28
|
+
// to compute the hash used by hash-based load balancing algorithms.
|
|
29
|
+
message FilterState {
|
|
30
|
+
// The name of the Object in the filterState, which is an Envoy::Hashable object. If there is no
|
|
31
|
+
// data associated with the key, or the stored object is not Envoy::Hashable, no hash will be
|
|
32
|
+
// produced.
|
|
33
|
+
string key = 1 [(validate.rules).string = {min_len: 1}];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
oneof policy_specifier {
|
|
37
|
+
option (validate.required) = true;
|
|
38
|
+
|
|
39
|
+
SourceIp source_ip = 1;
|
|
40
|
+
|
|
41
|
+
FilterState filter_state = 2;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type.v3;
|
|
4
|
+
|
|
5
|
+
import "udpa/annotations/status.proto";
|
|
6
|
+
|
|
7
|
+
option java_package = "io.envoyproxy.envoy.type.v3";
|
|
8
|
+
option java_outer_classname = "HttpProto";
|
|
9
|
+
option java_multiple_files = true;
|
|
10
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3";
|
|
11
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
12
|
+
|
|
13
|
+
// [#protodoc-title: HTTP]
|
|
14
|
+
|
|
15
|
+
enum CodecClientType {
|
|
16
|
+
HTTP1 = 0;
|
|
17
|
+
|
|
18
|
+
HTTP2 = 1;
|
|
19
|
+
|
|
20
|
+
// [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with
|
|
21
|
+
// caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient
|
|
22
|
+
// to distinguish HTTP1 and HTTP2 traffic.
|
|
23
|
+
HTTP3 = 2;
|
|
24
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type.v3;
|
|
4
|
+
|
|
5
|
+
import "udpa/annotations/status.proto";
|
|
6
|
+
import "udpa/annotations/versioning.proto";
|
|
7
|
+
import "validate/validate.proto";
|
|
8
|
+
|
|
9
|
+
option java_package = "io.envoyproxy.envoy.type.v3";
|
|
10
|
+
option java_outer_classname = "HttpStatusProto";
|
|
11
|
+
option java_multiple_files = true;
|
|
12
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3";
|
|
13
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
14
|
+
|
|
15
|
+
// [#protodoc-title: HTTP status codes]
|
|
16
|
+
|
|
17
|
+
// HTTP response codes supported in Envoy.
|
|
18
|
+
// For more details: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
|
|
19
|
+
enum StatusCode {
|
|
20
|
+
// Empty - This code not part of the HTTP status code specification, but it is needed for proto
|
|
21
|
+
// `enum` type.
|
|
22
|
+
Empty = 0;
|
|
23
|
+
|
|
24
|
+
// Continue - ``100`` status code.
|
|
25
|
+
Continue = 100;
|
|
26
|
+
|
|
27
|
+
// OK - ``200`` status code.
|
|
28
|
+
OK = 200;
|
|
29
|
+
|
|
30
|
+
// Created - ``201`` status code.
|
|
31
|
+
Created = 201;
|
|
32
|
+
|
|
33
|
+
// Accepted - ``202`` status code.
|
|
34
|
+
Accepted = 202;
|
|
35
|
+
|
|
36
|
+
// NonAuthoritativeInformation - ``203`` status code.
|
|
37
|
+
NonAuthoritativeInformation = 203;
|
|
38
|
+
|
|
39
|
+
// NoContent - ``204`` status code.
|
|
40
|
+
NoContent = 204;
|
|
41
|
+
|
|
42
|
+
// ResetContent - ``205`` status code.
|
|
43
|
+
ResetContent = 205;
|
|
44
|
+
|
|
45
|
+
// PartialContent - ``206`` status code.
|
|
46
|
+
PartialContent = 206;
|
|
47
|
+
|
|
48
|
+
// MultiStatus - ``207`` status code.
|
|
49
|
+
MultiStatus = 207;
|
|
50
|
+
|
|
51
|
+
// AlreadyReported - ``208`` status code.
|
|
52
|
+
AlreadyReported = 208;
|
|
53
|
+
|
|
54
|
+
// IMUsed - ``226`` status code.
|
|
55
|
+
IMUsed = 226;
|
|
56
|
+
|
|
57
|
+
// MultipleChoices - ``300`` status code.
|
|
58
|
+
MultipleChoices = 300;
|
|
59
|
+
|
|
60
|
+
// MovedPermanently - ``301`` status code.
|
|
61
|
+
MovedPermanently = 301;
|
|
62
|
+
|
|
63
|
+
// Found - ``302`` status code.
|
|
64
|
+
Found = 302;
|
|
65
|
+
|
|
66
|
+
// SeeOther - ``303`` status code.
|
|
67
|
+
SeeOther = 303;
|
|
68
|
+
|
|
69
|
+
// NotModified - ``304`` status code.
|
|
70
|
+
NotModified = 304;
|
|
71
|
+
|
|
72
|
+
// UseProxy - ``305`` status code.
|
|
73
|
+
UseProxy = 305;
|
|
74
|
+
|
|
75
|
+
// TemporaryRedirect - ``307`` status code.
|
|
76
|
+
TemporaryRedirect = 307;
|
|
77
|
+
|
|
78
|
+
// PermanentRedirect - ``308`` status code.
|
|
79
|
+
PermanentRedirect = 308;
|
|
80
|
+
|
|
81
|
+
// BadRequest - ``400`` status code.
|
|
82
|
+
BadRequest = 400;
|
|
83
|
+
|
|
84
|
+
// Unauthorized - ``401`` status code.
|
|
85
|
+
Unauthorized = 401;
|
|
86
|
+
|
|
87
|
+
// PaymentRequired - ``402`` status code.
|
|
88
|
+
PaymentRequired = 402;
|
|
89
|
+
|
|
90
|
+
// Forbidden - ``403`` status code.
|
|
91
|
+
Forbidden = 403;
|
|
92
|
+
|
|
93
|
+
// NotFound - ``404`` status code.
|
|
94
|
+
NotFound = 404;
|
|
95
|
+
|
|
96
|
+
// MethodNotAllowed - ``405`` status code.
|
|
97
|
+
MethodNotAllowed = 405;
|
|
98
|
+
|
|
99
|
+
// NotAcceptable - ``406`` status code.
|
|
100
|
+
NotAcceptable = 406;
|
|
101
|
+
|
|
102
|
+
// ProxyAuthenticationRequired - ``407`` status code.
|
|
103
|
+
ProxyAuthenticationRequired = 407;
|
|
104
|
+
|
|
105
|
+
// RequestTimeout - ``408`` status code.
|
|
106
|
+
RequestTimeout = 408;
|
|
107
|
+
|
|
108
|
+
// Conflict - ``409`` status code.
|
|
109
|
+
Conflict = 409;
|
|
110
|
+
|
|
111
|
+
// Gone - ``410`` status code.
|
|
112
|
+
Gone = 410;
|
|
113
|
+
|
|
114
|
+
// LengthRequired - ``411`` status code.
|
|
115
|
+
LengthRequired = 411;
|
|
116
|
+
|
|
117
|
+
// PreconditionFailed - ``412`` status code.
|
|
118
|
+
PreconditionFailed = 412;
|
|
119
|
+
|
|
120
|
+
// PayloadTooLarge - ``413`` status code.
|
|
121
|
+
PayloadTooLarge = 413;
|
|
122
|
+
|
|
123
|
+
// URITooLong - ``414`` status code.
|
|
124
|
+
URITooLong = 414;
|
|
125
|
+
|
|
126
|
+
// UnsupportedMediaType - ``415`` status code.
|
|
127
|
+
UnsupportedMediaType = 415;
|
|
128
|
+
|
|
129
|
+
// RangeNotSatisfiable - ``416`` status code.
|
|
130
|
+
RangeNotSatisfiable = 416;
|
|
131
|
+
|
|
132
|
+
// ExpectationFailed - ``417`` status code.
|
|
133
|
+
ExpectationFailed = 417;
|
|
134
|
+
|
|
135
|
+
// MisdirectedRequest - ``421`` status code.
|
|
136
|
+
MisdirectedRequest = 421;
|
|
137
|
+
|
|
138
|
+
// UnprocessableEntity - ``422`` status code.
|
|
139
|
+
UnprocessableEntity = 422;
|
|
140
|
+
|
|
141
|
+
// Locked - ``423`` status code.
|
|
142
|
+
Locked = 423;
|
|
143
|
+
|
|
144
|
+
// FailedDependency - ``424`` status code.
|
|
145
|
+
FailedDependency = 424;
|
|
146
|
+
|
|
147
|
+
// UpgradeRequired - ``426`` status code.
|
|
148
|
+
UpgradeRequired = 426;
|
|
149
|
+
|
|
150
|
+
// PreconditionRequired - ``428`` status code.
|
|
151
|
+
PreconditionRequired = 428;
|
|
152
|
+
|
|
153
|
+
// TooManyRequests - ``429`` status code.
|
|
154
|
+
TooManyRequests = 429;
|
|
155
|
+
|
|
156
|
+
// RequestHeaderFieldsTooLarge - ``431`` status code.
|
|
157
|
+
RequestHeaderFieldsTooLarge = 431;
|
|
158
|
+
|
|
159
|
+
// InternalServerError - ``500`` status code.
|
|
160
|
+
InternalServerError = 500;
|
|
161
|
+
|
|
162
|
+
// NotImplemented - ``501`` status code.
|
|
163
|
+
NotImplemented = 501;
|
|
164
|
+
|
|
165
|
+
// BadGateway - ``502`` status code.
|
|
166
|
+
BadGateway = 502;
|
|
167
|
+
|
|
168
|
+
// ServiceUnavailable - ``503`` status code.
|
|
169
|
+
ServiceUnavailable = 503;
|
|
170
|
+
|
|
171
|
+
// GatewayTimeout - ``504`` status code.
|
|
172
|
+
GatewayTimeout = 504;
|
|
173
|
+
|
|
174
|
+
// HTTPVersionNotSupported - ``505`` status code.
|
|
175
|
+
HTTPVersionNotSupported = 505;
|
|
176
|
+
|
|
177
|
+
// VariantAlsoNegotiates - ``506`` status code.
|
|
178
|
+
VariantAlsoNegotiates = 506;
|
|
179
|
+
|
|
180
|
+
// InsufficientStorage - ``507`` status code.
|
|
181
|
+
InsufficientStorage = 507;
|
|
182
|
+
|
|
183
|
+
// LoopDetected - ``508`` status code.
|
|
184
|
+
LoopDetected = 508;
|
|
185
|
+
|
|
186
|
+
// NotExtended - ``510`` status code.
|
|
187
|
+
NotExtended = 510;
|
|
188
|
+
|
|
189
|
+
// NetworkAuthenticationRequired - ``511`` status code.
|
|
190
|
+
NetworkAuthenticationRequired = 511;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// HTTP status.
|
|
194
|
+
message HttpStatus {
|
|
195
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.HttpStatus";
|
|
196
|
+
|
|
197
|
+
// Supplies HTTP response code.
|
|
198
|
+
StatusCode code = 1 [(validate.rules).enum = {defined_only: true not_in: 0}];
|
|
199
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type.v3;
|
|
4
|
+
|
|
5
|
+
import "udpa/annotations/status.proto";
|
|
6
|
+
import "udpa/annotations/versioning.proto";
|
|
7
|
+
import "validate/validate.proto";
|
|
8
|
+
|
|
9
|
+
option java_package = "io.envoyproxy.envoy.type.v3";
|
|
10
|
+
option java_outer_classname = "PercentProto";
|
|
11
|
+
option java_multiple_files = true;
|
|
12
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3";
|
|
13
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
14
|
+
|
|
15
|
+
// [#protodoc-title: Percent]
|
|
16
|
+
|
|
17
|
+
// Identifies a percentage, in the range [0.0, 100.0].
|
|
18
|
+
message Percent {
|
|
19
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.Percent";
|
|
20
|
+
|
|
21
|
+
double value = 1 [(validate.rules).double = {lte: 100.0 gte: 0.0}];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// A fractional percentage is used in cases in which for performance reasons performing floating
|
|
25
|
+
// point to integer conversions during randomness calculations is undesirable. The message includes
|
|
26
|
+
// both a numerator and denominator that together determine the final fractional value.
|
|
27
|
+
//
|
|
28
|
+
// * **Example**: 1/100 = 1%.
|
|
29
|
+
// * **Example**: 3/10000 = 0.03%.
|
|
30
|
+
message FractionalPercent {
|
|
31
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.FractionalPercent";
|
|
32
|
+
|
|
33
|
+
// Fraction percentages support several fixed denominator values.
|
|
34
|
+
enum DenominatorType {
|
|
35
|
+
// 100.
|
|
36
|
+
//
|
|
37
|
+
// **Example**: 1/100 = 1%.
|
|
38
|
+
HUNDRED = 0;
|
|
39
|
+
|
|
40
|
+
// 10,000.
|
|
41
|
+
//
|
|
42
|
+
// **Example**: 1/10000 = 0.01%.
|
|
43
|
+
TEN_THOUSAND = 1;
|
|
44
|
+
|
|
45
|
+
// 1,000,000.
|
|
46
|
+
//
|
|
47
|
+
// **Example**: 1/1000000 = 0.0001%.
|
|
48
|
+
MILLION = 2;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Specifies the numerator. Defaults to 0.
|
|
52
|
+
uint32 numerator = 1;
|
|
53
|
+
|
|
54
|
+
// Specifies the denominator. If the denominator specified is less than the numerator, the final
|
|
55
|
+
// fractional percentage is capped at 1 (100%).
|
|
56
|
+
DenominatorType denominator = 2 [(validate.rules).enum = {defined_only: true}];
|
|
57
|
+
}
|