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,53 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package xds.type.matcher.v3;
|
|
4
|
+
|
|
5
|
+
import "xds/annotations/v3/status.proto";
|
|
6
|
+
import "xds/core/v3/cidr.proto";
|
|
7
|
+
import "xds/type/matcher/v3/matcher.proto";
|
|
8
|
+
|
|
9
|
+
import "validate/validate.proto";
|
|
10
|
+
|
|
11
|
+
option java_package = "com.github.xds.type.matcher.v3";
|
|
12
|
+
option java_outer_classname = "IPMatcherProto";
|
|
13
|
+
option java_multiple_files = true;
|
|
14
|
+
option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3";
|
|
15
|
+
|
|
16
|
+
option (xds.annotations.v3.file_status).work_in_progress = true;
|
|
17
|
+
|
|
18
|
+
// [#protodoc-title: IP matcher]
|
|
19
|
+
|
|
20
|
+
// Matches a specific IP address against a set of possibly overlapping subnets using a trie.
|
|
21
|
+
message IPMatcher {
|
|
22
|
+
// Specifies a list of IP address ranges and a match action.
|
|
23
|
+
message IPRangeMatcher {
|
|
24
|
+
// A non-empty set of CIDR ranges.
|
|
25
|
+
repeated core.v3.CidrRange ranges = 1 [(validate.rules).repeated = {min_items: 1}];
|
|
26
|
+
|
|
27
|
+
// Match action to apply when the IP address is within one of the CIDR ranges.
|
|
28
|
+
Matcher.OnMatch on_match = 2;
|
|
29
|
+
|
|
30
|
+
// Indicates whether this match option should be considered if there is a
|
|
31
|
+
// more specific matcher. Exclusive matchers are not selected whenever a
|
|
32
|
+
// more specific matcher exists (e.g. matcher with a longer prefix) even
|
|
33
|
+
// when the more specific matcher fails its nested match condition.
|
|
34
|
+
// Non-exclusive matchers are considered if the more specific matcher
|
|
35
|
+
// exists but its nested match condition does not entirely match.
|
|
36
|
+
// Non-exclusive matchers are selected in the order of their specificity
|
|
37
|
+
// first (longest prefix first), then the order of declaration next.
|
|
38
|
+
//
|
|
39
|
+
// For example, consider two range matchers: an exclusive matcher *X* on
|
|
40
|
+
// ``0.0.0.0/0`` and a matcher *Y* on ``192.0.0.0/2`` with a nested match
|
|
41
|
+
// condition *Z*. For the input IP ``192.168.0.1`` matcher *Y* is the most
|
|
42
|
+
// specific. If its nested match condition *Z* does not accept the input,
|
|
43
|
+
// then the less specific matcher *X* does not apply either despite the
|
|
44
|
+
// input being within the range, because matcher *X* is exclusive.
|
|
45
|
+
//
|
|
46
|
+
// The opposite is true if matcher *X* is not marked as exclusive. In that
|
|
47
|
+
// case matcher *X* always matches whenever matcher "*Y* rejects the input.
|
|
48
|
+
bool exclusive = 3;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Match IP address by CIDR ranges.
|
|
52
|
+
repeated IPRangeMatcher range_matchers = 1;
|
|
53
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package xds.type.matcher.v3;
|
|
4
|
+
|
|
5
|
+
import "xds/core/v3/extension.proto";
|
|
6
|
+
import "xds/type/matcher/v3/string.proto";
|
|
7
|
+
|
|
8
|
+
import "validate/validate.proto";
|
|
9
|
+
|
|
10
|
+
option java_package = "com.github.xds.type.matcher.v3";
|
|
11
|
+
option java_outer_classname = "MatcherProto";
|
|
12
|
+
option java_multiple_files = true;
|
|
13
|
+
option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3";
|
|
14
|
+
|
|
15
|
+
// [#protodoc-title: Unified Matcher API]
|
|
16
|
+
|
|
17
|
+
// A matcher, which may traverse a matching tree in order to result in a match action.
|
|
18
|
+
// During matching, the tree will be traversed until a match is found, or if no match
|
|
19
|
+
// is found the action specified by the most specific on_no_match will be evaluated.
|
|
20
|
+
// As an on_no_match might result in another matching tree being evaluated, this process
|
|
21
|
+
// might repeat several times until the final OnMatch (or no match) is decided.
|
|
22
|
+
message Matcher {
|
|
23
|
+
// What to do if a match is successful.
|
|
24
|
+
message OnMatch {
|
|
25
|
+
oneof on_match {
|
|
26
|
+
option (validate.required) = true;
|
|
27
|
+
|
|
28
|
+
// Nested matcher to evaluate.
|
|
29
|
+
// If the nested matcher does not match and does not specify
|
|
30
|
+
// on_no_match, then this matcher is considered not to have
|
|
31
|
+
// matched, even if a predicate at this level or above returned
|
|
32
|
+
// true.
|
|
33
|
+
Matcher matcher = 1;
|
|
34
|
+
|
|
35
|
+
// Protocol-specific action to take.
|
|
36
|
+
core.v3.TypedExtensionConfig action = 2;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// If true and the Matcher matches, the action will be taken but the caller
|
|
40
|
+
// will behave as if the Matcher did not match. A subsequent matcher or
|
|
41
|
+
// on_no_match action will be used instead.
|
|
42
|
+
// This field is not supported in all contexts in which the matcher API is
|
|
43
|
+
// used. If this field is set in a context in which it's not supported,
|
|
44
|
+
// the resource will be rejected.
|
|
45
|
+
bool keep_matching = 3;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// A linear list of field matchers.
|
|
49
|
+
// The field matchers are evaluated in order, and the first match
|
|
50
|
+
// wins.
|
|
51
|
+
message MatcherList {
|
|
52
|
+
// Predicate to determine if a match is successful.
|
|
53
|
+
message Predicate {
|
|
54
|
+
// Predicate for a single input field.
|
|
55
|
+
message SinglePredicate {
|
|
56
|
+
// Protocol-specific specification of input field to match on.
|
|
57
|
+
// [#extension-category: envoy.matching.common_inputs]
|
|
58
|
+
core.v3.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}];
|
|
59
|
+
|
|
60
|
+
oneof matcher {
|
|
61
|
+
option (validate.required) = true;
|
|
62
|
+
|
|
63
|
+
// Built-in string matcher.
|
|
64
|
+
type.matcher.v3.StringMatcher value_match = 2;
|
|
65
|
+
|
|
66
|
+
// Extension for custom matching logic.
|
|
67
|
+
// [#extension-category: envoy.matching.input_matchers]
|
|
68
|
+
core.v3.TypedExtensionConfig custom_match = 3;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// A list of two or more matchers. Used to allow using a list within a oneof.
|
|
73
|
+
message PredicateList {
|
|
74
|
+
repeated Predicate predicate = 1 [(validate.rules).repeated = {min_items: 2}];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
oneof match_type {
|
|
78
|
+
option (validate.required) = true;
|
|
79
|
+
|
|
80
|
+
// A single predicate to evaluate.
|
|
81
|
+
SinglePredicate single_predicate = 1;
|
|
82
|
+
|
|
83
|
+
// A list of predicates to be OR-ed together.
|
|
84
|
+
PredicateList or_matcher = 2;
|
|
85
|
+
|
|
86
|
+
// A list of predicates to be AND-ed together.
|
|
87
|
+
PredicateList and_matcher = 3;
|
|
88
|
+
|
|
89
|
+
// The invert of a predicate
|
|
90
|
+
Predicate not_matcher = 4;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// An individual matcher.
|
|
95
|
+
message FieldMatcher {
|
|
96
|
+
// Determines if the match succeeds.
|
|
97
|
+
Predicate predicate = 1 [(validate.rules).message = {required: true}];
|
|
98
|
+
|
|
99
|
+
// What to do if the match succeeds.
|
|
100
|
+
OnMatch on_match = 2 [(validate.rules).message = {required: true}];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// A list of matchers. First match wins.
|
|
104
|
+
repeated FieldMatcher matchers = 1 [(validate.rules).repeated = {min_items: 1}];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
message MatcherTree {
|
|
108
|
+
// A map of configured matchers. Used to allow using a map within a oneof.
|
|
109
|
+
message MatchMap {
|
|
110
|
+
map<string, OnMatch> map = 1 [(validate.rules).map = {min_pairs: 1}];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Protocol-specific specification of input field to match on.
|
|
114
|
+
core.v3.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}];
|
|
115
|
+
|
|
116
|
+
// Exact or prefix match maps in which to look up the input value.
|
|
117
|
+
// If the lookup succeeds, the match is considered successful, and
|
|
118
|
+
// the corresponding OnMatch is used.
|
|
119
|
+
oneof tree_type {
|
|
120
|
+
option (validate.required) = true;
|
|
121
|
+
|
|
122
|
+
MatchMap exact_match_map = 2;
|
|
123
|
+
|
|
124
|
+
// Longest matching prefix wins.
|
|
125
|
+
MatchMap prefix_match_map = 3;
|
|
126
|
+
|
|
127
|
+
// Extension for custom matching logic.
|
|
128
|
+
core.v3.TypedExtensionConfig custom_match = 4;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
oneof matcher_type {
|
|
133
|
+
// A linear list of matchers to evaluate.
|
|
134
|
+
MatcherList matcher_list = 1;
|
|
135
|
+
|
|
136
|
+
// A match tree to evaluate.
|
|
137
|
+
MatcherTree matcher_tree = 2;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Optional OnMatch to use if no matcher above matched (e.g., if there are no matchers specified
|
|
141
|
+
// above, or if none of the matches specified above succeeded).
|
|
142
|
+
// If no matcher above matched and this field is not populated, the match will be considered unsuccessful.
|
|
143
|
+
OnMatch on_no_match = 3;
|
|
144
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package xds.type.matcher.v3;
|
|
4
|
+
|
|
5
|
+
import "validate/validate.proto";
|
|
6
|
+
|
|
7
|
+
option java_package = "com.github.xds.type.matcher.v3";
|
|
8
|
+
option java_outer_classname = "RegexProto";
|
|
9
|
+
option java_multiple_files = true;
|
|
10
|
+
option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3";
|
|
11
|
+
|
|
12
|
+
// [#protodoc-title: Regex matcher]
|
|
13
|
+
|
|
14
|
+
// A regex matcher designed for safety when used with untrusted input.
|
|
15
|
+
message RegexMatcher {
|
|
16
|
+
// Google's `RE2 <https://github.com/google/re2>`_ regex engine. The regex
|
|
17
|
+
// string must adhere to the documented `syntax
|
|
18
|
+
// <https://github.com/google/re2/wiki/Syntax>`_. The engine is designed to
|
|
19
|
+
// complete execution in linear time as well as limit the amount of memory
|
|
20
|
+
// used.
|
|
21
|
+
//
|
|
22
|
+
// Envoy supports program size checking via runtime. The runtime keys
|
|
23
|
+
// `re2.max_program_size.error_level` and `re2.max_program_size.warn_level`
|
|
24
|
+
// can be set to integers as the maximum program size or complexity that a
|
|
25
|
+
// compiled regex can have before an exception is thrown or a warning is
|
|
26
|
+
// logged, respectively. `re2.max_program_size.error_level` defaults to 100,
|
|
27
|
+
// and `re2.max_program_size.warn_level` has no default if unset (will not
|
|
28
|
+
// check/log a warning).
|
|
29
|
+
//
|
|
30
|
+
// Envoy emits two stats for tracking the program size of regexes: the
|
|
31
|
+
// histogram `re2.program_size`, which records the program size, and the
|
|
32
|
+
// counter `re2.exceeded_warn_level`, which is incremented each time the
|
|
33
|
+
// program size exceeds the warn level threshold.
|
|
34
|
+
message GoogleRE2 {}
|
|
35
|
+
|
|
36
|
+
oneof engine_type {
|
|
37
|
+
option (validate.required) = true;
|
|
38
|
+
|
|
39
|
+
// Google's RE2 regex engine.
|
|
40
|
+
GoogleRE2 google_re2 = 1 [ (validate.rules).message = {required : true} ];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// The regex match string. The string must be supported by the configured
|
|
44
|
+
// engine.
|
|
45
|
+
string regex = 2 [ (validate.rules).string = {min_len : 1} ];
|
|
46
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package xds.type.matcher.v3;
|
|
4
|
+
|
|
5
|
+
import "xds/core/v3/extension.proto";
|
|
6
|
+
import "xds/type/matcher/v3/regex.proto";
|
|
7
|
+
|
|
8
|
+
import "validate/validate.proto";
|
|
9
|
+
|
|
10
|
+
option java_package = "com.github.xds.type.matcher.v3";
|
|
11
|
+
option java_outer_classname = "StringProto";
|
|
12
|
+
option java_multiple_files = true;
|
|
13
|
+
option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3";
|
|
14
|
+
|
|
15
|
+
// [#protodoc-title: String matcher]
|
|
16
|
+
|
|
17
|
+
// Specifies the way to match a string.
|
|
18
|
+
// [#next-free-field: 9]
|
|
19
|
+
message StringMatcher {
|
|
20
|
+
oneof match_pattern {
|
|
21
|
+
option (validate.required) = true;
|
|
22
|
+
|
|
23
|
+
// The input string must match exactly the string specified here.
|
|
24
|
+
//
|
|
25
|
+
// Examples:
|
|
26
|
+
//
|
|
27
|
+
// * *abc* only matches the value *abc*.
|
|
28
|
+
string exact = 1;
|
|
29
|
+
|
|
30
|
+
// The input string must have the prefix specified here.
|
|
31
|
+
// Note: empty prefix is not allowed, please use regex instead.
|
|
32
|
+
//
|
|
33
|
+
// Examples:
|
|
34
|
+
//
|
|
35
|
+
// * *abc* matches the value *abc.xyz*
|
|
36
|
+
string prefix = 2 [(validate.rules).string = {min_len: 1}];
|
|
37
|
+
|
|
38
|
+
// The input string must have the suffix specified here.
|
|
39
|
+
// Note: empty prefix is not allowed, please use regex instead.
|
|
40
|
+
//
|
|
41
|
+
// Examples:
|
|
42
|
+
//
|
|
43
|
+
// * *abc* matches the value *xyz.abc*
|
|
44
|
+
string suffix = 3 [(validate.rules).string = {min_len: 1}];
|
|
45
|
+
|
|
46
|
+
// The input string must match the regular expression specified here.
|
|
47
|
+
RegexMatcher safe_regex = 5 [(validate.rules).message = {required: true}];
|
|
48
|
+
|
|
49
|
+
// The input string must have the substring specified here.
|
|
50
|
+
// Note: empty contains match is not allowed, please use regex instead.
|
|
51
|
+
//
|
|
52
|
+
// Examples:
|
|
53
|
+
//
|
|
54
|
+
// * *abc* matches the value *xyz.abc.def*
|
|
55
|
+
string contains = 7 [(validate.rules).string = {min_len: 1}];
|
|
56
|
+
|
|
57
|
+
// Use an extension as the matcher type.
|
|
58
|
+
// [#extension-category: envoy.string_matcher]
|
|
59
|
+
xds.core.v3.TypedExtensionConfig custom = 8;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no
|
|
63
|
+
// effect for the safe_regex match.
|
|
64
|
+
// For example, the matcher *data* will match both input string *Data* and *data* if set to true.
|
|
65
|
+
bool ignore_case = 6;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Specifies a list of ways to match a string.
|
|
69
|
+
message ListStringMatcher {
|
|
70
|
+
repeated StringMatcher patterns = 1 [(validate.rules).repeated = {min_items: 1}];
|
|
71
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package xds.type.v3;
|
|
4
|
+
|
|
5
|
+
import "google/api/expr/v1alpha1/checked.proto";
|
|
6
|
+
import "google/api/expr/v1alpha1/syntax.proto";
|
|
7
|
+
import "cel/expr/checked.proto";
|
|
8
|
+
import "cel/expr/syntax.proto";
|
|
9
|
+
import "google/protobuf/wrappers.proto";
|
|
10
|
+
|
|
11
|
+
import "xds/annotations/v3/status.proto";
|
|
12
|
+
|
|
13
|
+
import "validate/validate.proto";
|
|
14
|
+
|
|
15
|
+
option java_package = "com.github.xds.type.v3";
|
|
16
|
+
option java_outer_classname = "CelProto";
|
|
17
|
+
option java_multiple_files = true;
|
|
18
|
+
option go_package = "github.com/cncf/xds/go/xds/type/v3";
|
|
19
|
+
|
|
20
|
+
option (xds.annotations.v3.file_status).work_in_progress = true;
|
|
21
|
+
|
|
22
|
+
// [#protodoc-title: Common Expression Language (CEL)]
|
|
23
|
+
|
|
24
|
+
// Either parsed or checked representation of the `Common Expression Language
|
|
25
|
+
// <https://github.com/google/cel-spec>`_ (CEL) program.
|
|
26
|
+
message CelExpression {
|
|
27
|
+
oneof expr_specifier {
|
|
28
|
+
// Parsed expression in abstract syntax tree (AST) form.
|
|
29
|
+
//
|
|
30
|
+
// Deprecated -- use ``cel_expr_parsed`` field instead.
|
|
31
|
+
// If ``cel_expr_parsed`` or ``cel_expr_checked`` is set, this field is not used.
|
|
32
|
+
google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1 [deprecated = true];
|
|
33
|
+
|
|
34
|
+
// Parsed expression in abstract syntax tree (AST) form that has been successfully type checked.
|
|
35
|
+
//
|
|
36
|
+
// Deprecated -- use ``cel_expr_checked`` field instead.
|
|
37
|
+
// If ``cel_expr_parsed`` or ``cel_expr_checked`` is set, this field is not used.
|
|
38
|
+
google.api.expr.v1alpha1.CheckedExpr checked_expr = 2 [deprecated = true];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Parsed expression in abstract syntax tree (AST) form.
|
|
42
|
+
//
|
|
43
|
+
// If ``cel_expr_checked`` is set, this field is not used.
|
|
44
|
+
cel.expr.ParsedExpr cel_expr_parsed = 3;
|
|
45
|
+
|
|
46
|
+
// Parsed expression in abstract syntax tree (AST) form that has been successfully type checked.
|
|
47
|
+
//
|
|
48
|
+
// If set, takes precedence over ``cel_expr_parsed``.
|
|
49
|
+
cel.expr.CheckedExpr cel_expr_checked = 4;
|
|
50
|
+
|
|
51
|
+
// Unparsed expression in string form. For example, ``request.headers['x-env'] == 'prod'`` will
|
|
52
|
+
// get ``x-env`` header value and compare it with ``prod``.
|
|
53
|
+
// Check the `Common Expression Language <https://github.com/google/cel-spec>`_ for more details.
|
|
54
|
+
//
|
|
55
|
+
// If set, takes precedence over ``cel_expr_parsed`` and ``cel_expr_checked``.
|
|
56
|
+
string cel_expr_string = 5;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Extracts a string by evaluating a `Common Expression Language
|
|
60
|
+
// <https://github.com/google/cel-spec>`_ (CEL) expression against the standardized set of
|
|
61
|
+
// :ref:`HTTP attributes <arch_overview_attributes>`.
|
|
62
|
+
//
|
|
63
|
+
// .. attention::
|
|
64
|
+
//
|
|
65
|
+
// Besides CEL evaluation raising an error explicitly, CEL program returning a type other than
|
|
66
|
+
// the ``string``, or not returning anything, are considered an error as well.
|
|
67
|
+
//
|
|
68
|
+
// [#comment:TODO(sergiitk): When implemented, add the extension tag.]
|
|
69
|
+
message CelExtractString {
|
|
70
|
+
// The CEL expression used to extract a string from the CEL environment.
|
|
71
|
+
// the "subject string") that should be replaced.
|
|
72
|
+
CelExpression expr_extract = 1 [(validate.rules).message = {required: true}];
|
|
73
|
+
|
|
74
|
+
// If CEL expression evaluates to an error, this value is be returned to the caller.
|
|
75
|
+
// If not set, the error is propagated to the caller.
|
|
76
|
+
google.protobuf.StringValue default_value = 2;
|
|
77
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package xds.type.v3;
|
|
4
|
+
|
|
5
|
+
option java_package = "com.github.xds.type.v3";
|
|
6
|
+
option java_outer_classname = "RangeProto";
|
|
7
|
+
option java_multiple_files = true;
|
|
8
|
+
option go_package = "github.com/cncf/xds/go/xds/type/v3";
|
|
9
|
+
|
|
10
|
+
// [#protodoc-title: Number range]
|
|
11
|
+
|
|
12
|
+
// Specifies the int64 start and end of the range using half-open interval
|
|
13
|
+
// semantics [start, end).
|
|
14
|
+
message Int64Range {
|
|
15
|
+
// start of the range (inclusive)
|
|
16
|
+
int64 start = 1;
|
|
17
|
+
|
|
18
|
+
// end of the range (exclusive)
|
|
19
|
+
int64 end = 2;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Specifies the int32 start and end of the range using half-open interval
|
|
23
|
+
// semantics [start, end).
|
|
24
|
+
message Int32Range {
|
|
25
|
+
// start of the range (inclusive)
|
|
26
|
+
int32 start = 1;
|
|
27
|
+
|
|
28
|
+
// end of the range (exclusive)
|
|
29
|
+
int32 end = 2;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Specifies the double start and end of the range using half-open interval
|
|
33
|
+
// semantics [start, end).
|
|
34
|
+
message DoubleRange {
|
|
35
|
+
// start of the range (inclusive)
|
|
36
|
+
double start = 1;
|
|
37
|
+
|
|
38
|
+
// end of the range (exclusive)
|
|
39
|
+
double end = 2;
|
|
40
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package xds.type.v3;
|
|
4
|
+
|
|
5
|
+
option java_outer_classname = "TypedStructProto";
|
|
6
|
+
option java_multiple_files = true;
|
|
7
|
+
option java_package = "com.github.xds.type.v3";
|
|
8
|
+
option go_package = "github.com/cncf/xds/go/xds/type/v3";
|
|
9
|
+
|
|
10
|
+
import "google/protobuf/struct.proto";
|
|
11
|
+
|
|
12
|
+
// A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that
|
|
13
|
+
// describes the type of the serialized message. This is very similar to google.protobuf.Any,
|
|
14
|
+
// instead of having protocol buffer binary, this employs google.protobuf.Struct as value.
|
|
15
|
+
//
|
|
16
|
+
// This message is intended to be embedded inside Any, so it shouldn't be directly referred
|
|
17
|
+
// from other UDPA messages.
|
|
18
|
+
//
|
|
19
|
+
// When packing an opaque extension config, packing the expected type into Any is preferred
|
|
20
|
+
// wherever possible for its efficiency. TypedStruct should be used only if a proto descriptor
|
|
21
|
+
// is not available, for example if:
|
|
22
|
+
//
|
|
23
|
+
// - A control plane sends opaque message that is originally from external source in human readable
|
|
24
|
+
// format such as JSON or YAML.
|
|
25
|
+
// - The control plane doesn't have the knowledge of the protocol buffer schema hence it cannot
|
|
26
|
+
// serialize the message in protocol buffer binary format.
|
|
27
|
+
// - The DPLB doesn't have have the knowledge of the protocol buffer schema its plugin or extension
|
|
28
|
+
// uses. This has to be indicated in the DPLB capability negotiation.
|
|
29
|
+
//
|
|
30
|
+
// When a DPLB receives a TypedStruct in Any, it should:
|
|
31
|
+
// - Check if the type_url of the TypedStruct matches the type the extension expects.
|
|
32
|
+
// - Convert value to the type described in type_url and perform validation.
|
|
33
|
+
//
|
|
34
|
+
// TODO(lizan): Figure out how TypeStruct should be used with DPLB extensions that doesn't link
|
|
35
|
+
// protobuf descriptor with DPLB itself, (e.g. gRPC LB Plugin, Envoy WASM extensions).
|
|
36
|
+
message TypedStruct {
|
|
37
|
+
// A URL that uniquely identifies the type of the serialize protocol buffer message.
|
|
38
|
+
// This has same semantics and format described in google.protobuf.Any:
|
|
39
|
+
// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto
|
|
40
|
+
string type_url = 1;
|
|
41
|
+
|
|
42
|
+
// A JSON representation of the above specified type.
|
|
43
|
+
google.protobuf.Struct value = 2;
|
|
44
|
+
}
|
data/readme.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Async::GRPC::XDS
|
|
2
|
+
|
|
3
|
+
xDS support for `async-grpc` clients.
|
|
4
|
+
|
|
5
|
+
This gem contains the experimental xDS implementation extracted from `async-grpc`, including Envoy xDS protobuf definitions, ADS discovery, CDS/EDS resource handling, and client-side load balancing.
|
|
6
|
+
|
|
7
|
+
[](https://github.com/socketry/async-grpc-xds/actions?workflow=Test)
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
Please see the [project documentation](https://socketry.github.io/async-grpc-xds/) for more details.
|
|
12
|
+
|
|
13
|
+
## Status
|
|
14
|
+
|
|
15
|
+
This is an early implementation focused on ADS with CDS and EDS. LDS/RDS, full routing semantics, NACK handling, locality weighting, and delta xDS are not complete yet.
|
|
16
|
+
|
|
17
|
+
## Testing
|
|
18
|
+
|
|
19
|
+
The `xds/` directory contains a Docker Compose integration environment with a Go xDS control plane and Ruby gRPC backends.
|
|
20
|
+
|
|
21
|
+
``` bash
|
|
22
|
+
docker-compose -f xds/docker-compose.yaml up --exit-code-from tests
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Releases
|
|
26
|
+
|
|
27
|
+
Please see the [project releases](https://socketry.github.io/async-grpc-xds/releases/index) for all releases.
|
|
28
|
+
|
|
29
|
+
### v0.1.0
|
|
30
|
+
|
|
31
|
+
- Initial extraction from `async-grpc`.
|
|
32
|
+
|
|
33
|
+
## See Also
|
|
34
|
+
|
|
35
|
+
- [async-grpc](https://github.com/socketry/async-grpc)
|
|
36
|
+
- [protocol-grpc](https://github.com/socketry/protocol-grpc)
|
|
37
|
+
- [async-http](https://github.com/socketry/async-http)
|
data/releases.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
FROM ruby:latest
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
ENV BUNDLE_GEMFILE=/app/gems.rb \
|
|
5
|
+
BUNDLE_WITHOUT=maintenance
|
|
6
|
+
|
|
7
|
+
# Install dependencies
|
|
8
|
+
RUN apt-get update && apt-get install -y \
|
|
9
|
+
build-essential \
|
|
10
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
11
|
+
|
|
12
|
+
# Copy gemfile, gemspec, and minimal lib files needed for gemspec.
|
|
13
|
+
COPY gems.rb *.gemspec ./
|
|
14
|
+
COPY lib/async/grpc/xds/version.rb lib/async/grpc/xds/version.rb
|
|
15
|
+
RUN bundle install
|
|
16
|
+
|
|
17
|
+
# Copy application code
|
|
18
|
+
COPY . .
|
|
19
|
+
|
|
20
|
+
# Expose port
|
|
21
|
+
EXPOSE ${PORT:-50051}
|
|
22
|
+
|
|
23
|
+
# Run gRPC server
|
|
24
|
+
CMD bundle exec ruby xds/backend_server.rb
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
FROM golang:1.21-alpine AS builder
|
|
2
|
+
|
|
3
|
+
# Install build dependencies
|
|
4
|
+
RUN apk add --no-cache git
|
|
5
|
+
|
|
6
|
+
WORKDIR /build
|
|
7
|
+
|
|
8
|
+
COPY go.mod go.sum ./
|
|
9
|
+
RUN go mod download
|
|
10
|
+
|
|
11
|
+
COPY test_server.go ./
|
|
12
|
+
RUN go build -o /xds-test-server test_server.go
|
|
13
|
+
|
|
14
|
+
FROM alpine:latest
|
|
15
|
+
|
|
16
|
+
RUN apk add --no-cache netcat-openbsd ca-certificates
|
|
17
|
+
|
|
18
|
+
COPY --from=builder /xds-test-server /xds-test-server
|
|
19
|
+
|
|
20
|
+
EXPOSE 18000 18001
|
|
21
|
+
|
|
22
|
+
CMD ["/xds-test-server", "-port", "18000"]
|