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,50 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type.v3;
|
|
4
|
+
|
|
5
|
+
import "udpa/annotations/status.proto";
|
|
6
|
+
import "udpa/annotations/versioning.proto";
|
|
7
|
+
|
|
8
|
+
option java_package = "io.envoyproxy.envoy.type.v3";
|
|
9
|
+
option java_outer_classname = "RangeProto";
|
|
10
|
+
option java_multiple_files = true;
|
|
11
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3";
|
|
12
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
13
|
+
|
|
14
|
+
// [#protodoc-title: Range]
|
|
15
|
+
|
|
16
|
+
// Specifies the int64 start and end of the range using half-open interval semantics [start,
|
|
17
|
+
// end).
|
|
18
|
+
message Int64Range {
|
|
19
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.Int64Range";
|
|
20
|
+
|
|
21
|
+
// start of the range (inclusive)
|
|
22
|
+
int64 start = 1;
|
|
23
|
+
|
|
24
|
+
// end of the range (exclusive)
|
|
25
|
+
int64 end = 2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Specifies the int32 start and end of the range using half-open interval semantics [start,
|
|
29
|
+
// end).
|
|
30
|
+
message Int32Range {
|
|
31
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.Int32Range";
|
|
32
|
+
|
|
33
|
+
// start of the range (inclusive)
|
|
34
|
+
int32 start = 1;
|
|
35
|
+
|
|
36
|
+
// end of the range (exclusive)
|
|
37
|
+
int32 end = 2;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Specifies the double start and end of the range using half-open interval semantics [start,
|
|
41
|
+
// end).
|
|
42
|
+
message DoubleRange {
|
|
43
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.DoubleRange";
|
|
44
|
+
|
|
45
|
+
// start of the range (inclusive)
|
|
46
|
+
double start = 1;
|
|
47
|
+
|
|
48
|
+
// end of the range (exclusive)
|
|
49
|
+
double end = 2;
|
|
50
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type.v3;
|
|
4
|
+
|
|
5
|
+
import "envoy/type/v3/ratelimit_unit.proto";
|
|
6
|
+
import "envoy/type/v3/token_bucket.proto";
|
|
7
|
+
|
|
8
|
+
import "xds/annotations/v3/status.proto";
|
|
9
|
+
|
|
10
|
+
import "udpa/annotations/status.proto";
|
|
11
|
+
import "validate/validate.proto";
|
|
12
|
+
|
|
13
|
+
option java_package = "io.envoyproxy.envoy.type.v3";
|
|
14
|
+
option java_outer_classname = "RatelimitStrategyProto";
|
|
15
|
+
option java_multiple_files = true;
|
|
16
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3";
|
|
17
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
18
|
+
option (xds.annotations.v3.file_status).work_in_progress = true;
|
|
19
|
+
|
|
20
|
+
// [#protodoc-title: Rate Limit Strategies]
|
|
21
|
+
|
|
22
|
+
message RateLimitStrategy {
|
|
23
|
+
// Choose between allow all and deny all.
|
|
24
|
+
enum BlanketRule {
|
|
25
|
+
ALLOW_ALL = 0;
|
|
26
|
+
DENY_ALL = 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Best-effort limit of the number of requests per time unit.
|
|
30
|
+
//
|
|
31
|
+
// Allows to specify the desired requests per second (RPS, QPS), requests per minute (QPM, RPM),
|
|
32
|
+
// etc., without specifying a rate limiting algorithm implementation.
|
|
33
|
+
//
|
|
34
|
+
// ``RequestsPerTimeUnit`` strategy does not demand any specific rate limiting algorithm to be
|
|
35
|
+
// used (in contrast to the :ref:`TokenBucket <envoy_v3_api_msg_type.v3.TokenBucket>`,
|
|
36
|
+
// for example). It implies that the implementation details of rate limiting algorithm are
|
|
37
|
+
// irrelevant as long as the configured number of "requests per time unit" is achieved.
|
|
38
|
+
//
|
|
39
|
+
// Note that the ``TokenBucket`` is still a valid implementation of the ``RequestsPerTimeUnit``
|
|
40
|
+
// strategy, and may be chosen to enforce the rate limit. However, there's no guarantee it will be
|
|
41
|
+
// the ``TokenBucket`` in particular, and not the Leaky Bucket, the Sliding Window, or any other
|
|
42
|
+
// rate limiting algorithm that fulfills the requirements.
|
|
43
|
+
message RequestsPerTimeUnit {
|
|
44
|
+
// The desired number of requests per :ref:`time_unit
|
|
45
|
+
// <envoy_v3_api_field_type.v3.RateLimitStrategy.RequestsPerTimeUnit.time_unit>` to allow.
|
|
46
|
+
// If set to ``0``, deny all (equivalent to ``BlanketRule.DENY_ALL``).
|
|
47
|
+
//
|
|
48
|
+
// .. note::
|
|
49
|
+
// Note that the algorithm implementation determines the course of action for the requests
|
|
50
|
+
// over the limit. As long as the ``requests_per_time_unit`` converges on the desired value,
|
|
51
|
+
// it's allowed to treat this field as a soft-limit: allow bursts, redistribute the allowance
|
|
52
|
+
// over time, etc.
|
|
53
|
+
//
|
|
54
|
+
uint64 requests_per_time_unit = 1;
|
|
55
|
+
|
|
56
|
+
// The unit of time. Ignored when :ref:`requests_per_time_unit
|
|
57
|
+
// <envoy_v3_api_field_type.v3.RateLimitStrategy.RequestsPerTimeUnit.requests_per_time_unit>`
|
|
58
|
+
// is ``0`` (deny all).
|
|
59
|
+
RateLimitUnit time_unit = 2 [(validate.rules).enum = {defined_only: true}];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
oneof strategy {
|
|
63
|
+
option (validate.required) = true;
|
|
64
|
+
|
|
65
|
+
// Allow or Deny the requests.
|
|
66
|
+
// If unset, allow all.
|
|
67
|
+
BlanketRule blanket_rule = 1 [(validate.rules).enum = {defined_only: true}];
|
|
68
|
+
|
|
69
|
+
// Best-effort limit of the number of requests per time unit, f.e. requests per second.
|
|
70
|
+
// Does not prescribe any specific rate limiting algorithm, see :ref:`RequestsPerTimeUnit
|
|
71
|
+
// <envoy_v3_api_msg_type.v3.RateLimitStrategy.RequestsPerTimeUnit>` for details.
|
|
72
|
+
RequestsPerTimeUnit requests_per_time_unit = 2;
|
|
73
|
+
|
|
74
|
+
// Limit the requests by consuming tokens from the Token Bucket.
|
|
75
|
+
// Allow the same number of requests as the number of tokens available in
|
|
76
|
+
// the token bucket.
|
|
77
|
+
TokenBucket token_bucket = 3;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 = "RatelimitUnitProto";
|
|
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: Ratelimit Time Unit]
|
|
14
|
+
|
|
15
|
+
// Identifies the unit of of time for rate limit.
|
|
16
|
+
enum RateLimitUnit {
|
|
17
|
+
// The time unit is not known.
|
|
18
|
+
UNKNOWN = 0;
|
|
19
|
+
|
|
20
|
+
// The time unit representing a second.
|
|
21
|
+
SECOND = 1;
|
|
22
|
+
|
|
23
|
+
// The time unit representing a minute.
|
|
24
|
+
MINUTE = 2;
|
|
25
|
+
|
|
26
|
+
// The time unit representing an hour.
|
|
27
|
+
HOUR = 3;
|
|
28
|
+
|
|
29
|
+
// The time unit representing a day.
|
|
30
|
+
DAY = 4;
|
|
31
|
+
|
|
32
|
+
// The time unit representing a month.
|
|
33
|
+
MONTH = 5;
|
|
34
|
+
|
|
35
|
+
// The time unit representing a year.
|
|
36
|
+
YEAR = 6;
|
|
37
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type.v3;
|
|
4
|
+
|
|
5
|
+
import "udpa/annotations/status.proto";
|
|
6
|
+
import "udpa/annotations/versioning.proto";
|
|
7
|
+
|
|
8
|
+
option java_package = "io.envoyproxy.envoy.type.v3";
|
|
9
|
+
option java_outer_classname = "SemanticVersionProto";
|
|
10
|
+
option java_multiple_files = true;
|
|
11
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3";
|
|
12
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
13
|
+
|
|
14
|
+
// [#protodoc-title: Semantic version]
|
|
15
|
+
|
|
16
|
+
// Envoy uses SemVer (https://semver.org/). Major/minor versions indicate
|
|
17
|
+
// expected behaviors and APIs, the patch version field is used only
|
|
18
|
+
// for security fixes and can be generally ignored.
|
|
19
|
+
message SemanticVersion {
|
|
20
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.SemanticVersion";
|
|
21
|
+
|
|
22
|
+
uint32 major_number = 1;
|
|
23
|
+
|
|
24
|
+
uint32 minor_number = 2;
|
|
25
|
+
|
|
26
|
+
uint32 patch = 3;
|
|
27
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.type.v3;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/duration.proto";
|
|
6
|
+
import "google/protobuf/wrappers.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.v3";
|
|
13
|
+
option java_outer_classname = "TokenBucketProto";
|
|
14
|
+
option java_multiple_files = true;
|
|
15
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3";
|
|
16
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
17
|
+
|
|
18
|
+
// [#protodoc-title: Token bucket]
|
|
19
|
+
|
|
20
|
+
// Configures a token bucket, typically used for rate limiting.
|
|
21
|
+
message TokenBucket {
|
|
22
|
+
option (udpa.annotations.versioning).previous_message_type = "envoy.type.TokenBucket";
|
|
23
|
+
|
|
24
|
+
// The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket
|
|
25
|
+
// initially contains.
|
|
26
|
+
uint32 max_tokens = 1 [(validate.rules).uint32 = {gt: 0}];
|
|
27
|
+
|
|
28
|
+
// The number of tokens added to the bucket during each fill interval. If not specified, defaults
|
|
29
|
+
// to a single token.
|
|
30
|
+
google.protobuf.UInt32Value tokens_per_fill = 2 [(validate.rules).uint32 = {gt: 0}];
|
|
31
|
+
|
|
32
|
+
// The fill interval that tokens are added to the bucket. During each fill interval
|
|
33
|
+
// ``tokens_per_fill`` are added to the bucket. The bucket will never contain more than
|
|
34
|
+
// ``max_tokens`` tokens.
|
|
35
|
+
google.protobuf.Duration fill_interval = 3 [(validate.rules).duration = {
|
|
36
|
+
required: true
|
|
37
|
+
gt {}
|
|
38
|
+
}];
|
|
39
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
// https://developers.google.com/protocol-buffers/
|
|
4
|
+
//
|
|
5
|
+
// Redistribution and use in source and binary forms, with or without
|
|
6
|
+
// modification, are permitted provided that the following conditions are
|
|
7
|
+
// met:
|
|
8
|
+
//
|
|
9
|
+
// * Redistributions of source code must retain the above copyright
|
|
10
|
+
// notice, this list of conditions and the following disclaimer.
|
|
11
|
+
// * Redistributions in binary form must reproduce the above
|
|
12
|
+
// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
+
// in the documentation and/or other materials provided with the
|
|
14
|
+
// distribution.
|
|
15
|
+
// * Neither the name of Google Inc. nor the names of its
|
|
16
|
+
// contributors may be used to endorse or promote products derived from
|
|
17
|
+
// this software without specific prior written permission.
|
|
18
|
+
//
|
|
19
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
|
|
31
|
+
syntax = "proto3";
|
|
32
|
+
|
|
33
|
+
package google.protobuf;
|
|
34
|
+
|
|
35
|
+
option go_package = "google.golang.org/protobuf/types/known/anypb";
|
|
36
|
+
option java_package = "com.google.protobuf";
|
|
37
|
+
option java_outer_classname = "AnyProto";
|
|
38
|
+
option java_multiple_files = true;
|
|
39
|
+
option objc_class_prefix = "GPB";
|
|
40
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
41
|
+
|
|
42
|
+
// `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
43
|
+
// URL that describes the type of the serialized message.
|
|
44
|
+
//
|
|
45
|
+
// Protobuf library provides support to pack/unpack Any values in the form
|
|
46
|
+
// of utility functions or additional generated methods of the Any type.
|
|
47
|
+
//
|
|
48
|
+
// Example 1: Pack and unpack a message in C++.
|
|
49
|
+
//
|
|
50
|
+
// Foo foo = ...;
|
|
51
|
+
// Any any;
|
|
52
|
+
// any.PackFrom(foo);
|
|
53
|
+
// ...
|
|
54
|
+
// if (any.UnpackTo(&foo)) {
|
|
55
|
+
// ...
|
|
56
|
+
// }
|
|
57
|
+
//
|
|
58
|
+
// Example 2: Pack and unpack a message in Java.
|
|
59
|
+
//
|
|
60
|
+
// Foo foo = ...;
|
|
61
|
+
// Any any = Any.pack(foo);
|
|
62
|
+
// ...
|
|
63
|
+
// if (any.is(Foo.class)) {
|
|
64
|
+
// foo = any.unpack(Foo.class);
|
|
65
|
+
// }
|
|
66
|
+
// // or ...
|
|
67
|
+
// if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
|
68
|
+
// foo = any.unpack(Foo.getDefaultInstance());
|
|
69
|
+
// }
|
|
70
|
+
//
|
|
71
|
+
// Example 3: Pack and unpack a message in Python.
|
|
72
|
+
//
|
|
73
|
+
// foo = Foo(...)
|
|
74
|
+
// any = Any()
|
|
75
|
+
// any.Pack(foo)
|
|
76
|
+
// ...
|
|
77
|
+
// if any.Is(Foo.DESCRIPTOR):
|
|
78
|
+
// any.Unpack(foo)
|
|
79
|
+
// ...
|
|
80
|
+
//
|
|
81
|
+
// Example 4: Pack and unpack a message in Go
|
|
82
|
+
//
|
|
83
|
+
// foo := &pb.Foo{...}
|
|
84
|
+
// any, err := anypb.New(foo)
|
|
85
|
+
// if err != nil {
|
|
86
|
+
// ...
|
|
87
|
+
// }
|
|
88
|
+
// ...
|
|
89
|
+
// foo := &pb.Foo{}
|
|
90
|
+
// if err := any.UnmarshalTo(foo); err != nil {
|
|
91
|
+
// ...
|
|
92
|
+
// }
|
|
93
|
+
//
|
|
94
|
+
// The pack methods provided by protobuf library will by default use
|
|
95
|
+
// 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
|
96
|
+
// methods only use the fully qualified type name after the last '/'
|
|
97
|
+
// in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
|
98
|
+
// name "y.z".
|
|
99
|
+
//
|
|
100
|
+
// JSON
|
|
101
|
+
// ====
|
|
102
|
+
// The JSON representation of an `Any` value uses the regular
|
|
103
|
+
// representation of the deserialized, embedded message, with an
|
|
104
|
+
// additional field `@type` which contains the type URL. Example:
|
|
105
|
+
//
|
|
106
|
+
// package google.profile;
|
|
107
|
+
// message Person {
|
|
108
|
+
// string first_name = 1;
|
|
109
|
+
// string last_name = 2;
|
|
110
|
+
// }
|
|
111
|
+
//
|
|
112
|
+
// {
|
|
113
|
+
// "@type": "type.googleapis.com/google.profile.Person",
|
|
114
|
+
// "firstName": <string>,
|
|
115
|
+
// "lastName": <string>
|
|
116
|
+
// }
|
|
117
|
+
//
|
|
118
|
+
// If the embedded message type is well-known and has a custom JSON
|
|
119
|
+
// representation, that representation will be embedded adding a field
|
|
120
|
+
// `value` which holds the custom JSON in addition to the `@type`
|
|
121
|
+
// field. Example (for message [google.protobuf.Duration][]):
|
|
122
|
+
//
|
|
123
|
+
// {
|
|
124
|
+
// "@type": "type.googleapis.com/google.protobuf.Duration",
|
|
125
|
+
// "value": "1.212s"
|
|
126
|
+
// }
|
|
127
|
+
//
|
|
128
|
+
message Any {
|
|
129
|
+
// A URL/resource name that uniquely identifies the type of the serialized
|
|
130
|
+
// protocol buffer message. This string must contain at least
|
|
131
|
+
// one "/" character. The last segment of the URL's path must represent
|
|
132
|
+
// the fully qualified name of the type (as in
|
|
133
|
+
// `path/google.protobuf.Duration`). The name should be in a canonical form
|
|
134
|
+
// (e.g., leading "." is not accepted).
|
|
135
|
+
//
|
|
136
|
+
// In practice, teams usually precompile into the binary all types that they
|
|
137
|
+
// expect it to use in the context of Any. However, for URLs which use the
|
|
138
|
+
// scheme `http`, `https`, or no scheme, one can optionally set up a type
|
|
139
|
+
// server that maps type URLs to message definitions as follows:
|
|
140
|
+
//
|
|
141
|
+
// * If no scheme is provided, `https` is assumed.
|
|
142
|
+
// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
143
|
+
// value in binary format, or produce an error.
|
|
144
|
+
// * Applications are allowed to cache lookup results based on the
|
|
145
|
+
// URL, or have them precompiled into a binary to avoid any
|
|
146
|
+
// lookup. Therefore, binary compatibility needs to be preserved
|
|
147
|
+
// on changes to types. (Use versioned type names to manage
|
|
148
|
+
// breaking changes.)
|
|
149
|
+
//
|
|
150
|
+
// Note: this functionality is not currently available in the official
|
|
151
|
+
// protobuf release, and it is not used for type URLs beginning with
|
|
152
|
+
// type.googleapis.com. As of May 2023, there are no widely used type server
|
|
153
|
+
// implementations and no plans to implement one.
|
|
154
|
+
//
|
|
155
|
+
// Schemes other than `http`, `https` (or the empty scheme) might be
|
|
156
|
+
// used with implementation specific semantics.
|
|
157
|
+
//
|
|
158
|
+
string type_url = 1;
|
|
159
|
+
|
|
160
|
+
// Must be a valid serialized protocol buffer of the above specified type.
|
|
161
|
+
bytes value = 2;
|
|
162
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
// https://developers.google.com/protocol-buffers/
|
|
4
|
+
//
|
|
5
|
+
// Redistribution and use in source and binary forms, with or without
|
|
6
|
+
// modification, are permitted provided that the following conditions are
|
|
7
|
+
// met:
|
|
8
|
+
//
|
|
9
|
+
// * Redistributions of source code must retain the above copyright
|
|
10
|
+
// notice, this list of conditions and the following disclaimer.
|
|
11
|
+
// * Redistributions in binary form must reproduce the above
|
|
12
|
+
// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
+
// in the documentation and/or other materials provided with the
|
|
14
|
+
// distribution.
|
|
15
|
+
// * Neither the name of Google Inc. nor the names of its
|
|
16
|
+
// contributors may be used to endorse or promote products derived from
|
|
17
|
+
// this software without specific prior written permission.
|
|
18
|
+
//
|
|
19
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
|
|
31
|
+
syntax = "proto3";
|
|
32
|
+
|
|
33
|
+
package google.protobuf;
|
|
34
|
+
|
|
35
|
+
option cc_enable_arenas = true;
|
|
36
|
+
option go_package = "google.golang.org/protobuf/types/known/durationpb";
|
|
37
|
+
option java_package = "com.google.protobuf";
|
|
38
|
+
option java_outer_classname = "DurationProto";
|
|
39
|
+
option java_multiple_files = true;
|
|
40
|
+
option objc_class_prefix = "GPB";
|
|
41
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
42
|
+
|
|
43
|
+
// A Duration represents a signed, fixed-length span of time represented
|
|
44
|
+
// as a count of seconds and fractions of seconds at nanosecond
|
|
45
|
+
// resolution. It is independent of any calendar and concepts like "day"
|
|
46
|
+
// or "month". It is related to Timestamp in that the difference between
|
|
47
|
+
// two Timestamp values is a Duration and it can be added or subtracted
|
|
48
|
+
// from a Timestamp. Range is approximately +-10,000 years.
|
|
49
|
+
//
|
|
50
|
+
// # Examples
|
|
51
|
+
//
|
|
52
|
+
// Example 1: Compute Duration from two Timestamps in pseudo code.
|
|
53
|
+
//
|
|
54
|
+
// Timestamp start = ...;
|
|
55
|
+
// Timestamp end = ...;
|
|
56
|
+
// Duration duration = ...;
|
|
57
|
+
//
|
|
58
|
+
// duration.seconds = end.seconds - start.seconds;
|
|
59
|
+
// duration.nanos = end.nanos - start.nanos;
|
|
60
|
+
//
|
|
61
|
+
// if (duration.seconds < 0 && duration.nanos > 0) {
|
|
62
|
+
// duration.seconds += 1;
|
|
63
|
+
// duration.nanos -= 1000000000;
|
|
64
|
+
// } else if (duration.seconds > 0 && duration.nanos < 0) {
|
|
65
|
+
// duration.seconds -= 1;
|
|
66
|
+
// duration.nanos += 1000000000;
|
|
67
|
+
// }
|
|
68
|
+
//
|
|
69
|
+
// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
|
70
|
+
//
|
|
71
|
+
// Timestamp start = ...;
|
|
72
|
+
// Duration duration = ...;
|
|
73
|
+
// Timestamp end = ...;
|
|
74
|
+
//
|
|
75
|
+
// end.seconds = start.seconds + duration.seconds;
|
|
76
|
+
// end.nanos = start.nanos + duration.nanos;
|
|
77
|
+
//
|
|
78
|
+
// if (end.nanos < 0) {
|
|
79
|
+
// end.seconds -= 1;
|
|
80
|
+
// end.nanos += 1000000000;
|
|
81
|
+
// } else if (end.nanos >= 1000000000) {
|
|
82
|
+
// end.seconds += 1;
|
|
83
|
+
// end.nanos -= 1000000000;
|
|
84
|
+
// }
|
|
85
|
+
//
|
|
86
|
+
// Example 3: Compute Duration from datetime.timedelta in Python.
|
|
87
|
+
//
|
|
88
|
+
// td = datetime.timedelta(days=3, minutes=10)
|
|
89
|
+
// duration = Duration()
|
|
90
|
+
// duration.FromTimedelta(td)
|
|
91
|
+
//
|
|
92
|
+
// # JSON Mapping
|
|
93
|
+
//
|
|
94
|
+
// In JSON format, the Duration type is encoded as a string rather than an
|
|
95
|
+
// object, where the string ends in the suffix "s" (indicating seconds) and
|
|
96
|
+
// is preceded by the number of seconds, with nanoseconds expressed as
|
|
97
|
+
// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
|
98
|
+
// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
|
99
|
+
// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
|
100
|
+
// microsecond should be expressed in JSON format as "3.000001s".
|
|
101
|
+
//
|
|
102
|
+
message Duration {
|
|
103
|
+
// Signed seconds of the span of time. Must be from -315,576,000,000
|
|
104
|
+
// to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
|
105
|
+
// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
|
106
|
+
int64 seconds = 1;
|
|
107
|
+
|
|
108
|
+
// Signed fractions of a second at nanosecond resolution of the span
|
|
109
|
+
// of time. Durations less than one second are represented with a 0
|
|
110
|
+
// `seconds` field and a positive or negative `nanos` field. For durations
|
|
111
|
+
// of one second or more, a non-zero value for the `nanos` field must be
|
|
112
|
+
// of the same sign as the `seconds` field. Must be from -999,999,999
|
|
113
|
+
// to +999,999,999 inclusive.
|
|
114
|
+
int32 nanos = 2;
|
|
115
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
// https://developers.google.com/protocol-buffers/
|
|
4
|
+
//
|
|
5
|
+
// Redistribution and use in source and binary forms, with or without
|
|
6
|
+
// modification, are permitted provided that the following conditions are
|
|
7
|
+
// met:
|
|
8
|
+
//
|
|
9
|
+
// * Redistributions of source code must retain the above copyright
|
|
10
|
+
// notice, this list of conditions and the following disclaimer.
|
|
11
|
+
// * Redistributions in binary form must reproduce the above
|
|
12
|
+
// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
+
// in the documentation and/or other materials provided with the
|
|
14
|
+
// distribution.
|
|
15
|
+
// * Neither the name of Google Inc. nor the names of its
|
|
16
|
+
// contributors may be used to endorse or promote products derived from
|
|
17
|
+
// this software without specific prior written permission.
|
|
18
|
+
//
|
|
19
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
|
|
31
|
+
syntax = "proto3";
|
|
32
|
+
|
|
33
|
+
package google.protobuf;
|
|
34
|
+
|
|
35
|
+
option go_package = "google.golang.org/protobuf/types/known/emptypb";
|
|
36
|
+
option java_package = "com.google.protobuf";
|
|
37
|
+
option java_outer_classname = "EmptyProto";
|
|
38
|
+
option java_multiple_files = true;
|
|
39
|
+
option objc_class_prefix = "GPB";
|
|
40
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
41
|
+
option cc_enable_arenas = true;
|
|
42
|
+
|
|
43
|
+
// A generic empty message that you can re-use to avoid defining duplicated
|
|
44
|
+
// empty messages in your APIs. A typical example is to use it as the request
|
|
45
|
+
// or the response type of an API method. For instance:
|
|
46
|
+
//
|
|
47
|
+
// service Foo {
|
|
48
|
+
// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
49
|
+
// }
|
|
50
|
+
//
|
|
51
|
+
message Empty {}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
// https://developers.google.com/protocol-buffers/
|
|
4
|
+
//
|
|
5
|
+
// Redistribution and use in source and binary forms, with or without
|
|
6
|
+
// modification, are permitted provided that the following conditions are
|
|
7
|
+
// met:
|
|
8
|
+
//
|
|
9
|
+
// * Redistributions of source code must retain the above copyright
|
|
10
|
+
// notice, this list of conditions and the following disclaimer.
|
|
11
|
+
// * Redistributions in binary form must reproduce the above
|
|
12
|
+
// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
+
// in the documentation and/or other materials provided with the
|
|
14
|
+
// distribution.
|
|
15
|
+
// * Neither the name of Google Inc. nor the names of its
|
|
16
|
+
// contributors may be used to endorse or promote products derived from
|
|
17
|
+
// this software without specific prior written permission.
|
|
18
|
+
//
|
|
19
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
|
|
31
|
+
syntax = "proto3";
|
|
32
|
+
|
|
33
|
+
package google.protobuf;
|
|
34
|
+
|
|
35
|
+
option cc_enable_arenas = true;
|
|
36
|
+
option go_package = "google.golang.org/protobuf/types/known/structpb";
|
|
37
|
+
option java_package = "com.google.protobuf";
|
|
38
|
+
option java_outer_classname = "StructProto";
|
|
39
|
+
option java_multiple_files = true;
|
|
40
|
+
option objc_class_prefix = "GPB";
|
|
41
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
42
|
+
|
|
43
|
+
// `Struct` represents a structured data value, consisting of fields
|
|
44
|
+
// which map to dynamically typed values. In some languages, `Struct`
|
|
45
|
+
// might be supported by a native representation. For example, in
|
|
46
|
+
// scripting languages like JS a struct is represented as an
|
|
47
|
+
// object. The details of that representation are described together
|
|
48
|
+
// with the proto support for the language.
|
|
49
|
+
//
|
|
50
|
+
// The JSON representation for `Struct` is JSON object.
|
|
51
|
+
message Struct {
|
|
52
|
+
// Unordered map of dynamically typed values.
|
|
53
|
+
map<string, Value> fields = 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// `Value` represents a dynamically typed value which can be either
|
|
57
|
+
// null, a number, a string, a boolean, a recursive struct value, or a
|
|
58
|
+
// list of values. A producer of value is expected to set one of these
|
|
59
|
+
// variants. Absence of any variant indicates an error.
|
|
60
|
+
//
|
|
61
|
+
// The JSON representation for `Value` is JSON value.
|
|
62
|
+
message Value {
|
|
63
|
+
// The kind of value.
|
|
64
|
+
oneof kind {
|
|
65
|
+
// Represents a null value.
|
|
66
|
+
NullValue null_value = 1;
|
|
67
|
+
// Represents a double value.
|
|
68
|
+
double number_value = 2;
|
|
69
|
+
// Represents a string value.
|
|
70
|
+
string string_value = 3;
|
|
71
|
+
// Represents a boolean value.
|
|
72
|
+
bool bool_value = 4;
|
|
73
|
+
// Represents a structured value.
|
|
74
|
+
Struct struct_value = 5;
|
|
75
|
+
// Represents a repeated `Value`.
|
|
76
|
+
ListValue list_value = 6;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// `NullValue` is a singleton enumeration to represent the null value for the
|
|
81
|
+
// `Value` type union.
|
|
82
|
+
//
|
|
83
|
+
// The JSON representation for `NullValue` is JSON `null`.
|
|
84
|
+
enum NullValue {
|
|
85
|
+
// Null value.
|
|
86
|
+
NULL_VALUE = 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// `ListValue` is a wrapper around a repeated field of values.
|
|
90
|
+
//
|
|
91
|
+
// The JSON representation for `ListValue` is JSON array.
|
|
92
|
+
message ListValue {
|
|
93
|
+
// Repeated field of dynamically typed values.
|
|
94
|
+
repeated Value values = 1;
|
|
95
|
+
}
|