-
Notifications
You must be signed in to change notification settings - Fork 273
api: Google gRPC client library configuration. #398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6d68cb8
api: Google gRPC client library configuration.
htuch 4b35549
Some new lines.
htuch 7ebff6f
Review feedback.
htuch 93e9278
wip
htuch e2c9726
Merge remote-tracking branch 'upstream/master' into grpc-api
htuch 838c11c
Merge remote-tracking branch 'upstream/master' into grpc-api
htuch ae82e81
Review feedback.
htuch 531ed78
Review feedback.
htuch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package envoy.api.v2; | ||
|
|
||
| import "api/grpc_service.proto"; | ||
|
|
||
| import "google/protobuf/duration.proto"; | ||
|
|
||
| import "validate/validate.proto"; | ||
| import "gogoproto/gogo.proto"; | ||
|
|
||
| // [#protodoc-title: Configuration sources] | ||
|
|
||
| // API configuration source. This identifies the API type and cluster that Envoy | ||
| // will use to fetch an xDS API. | ||
| message ApiConfigSource { | ||
| // APIs may be fetched via either REST or gRPC. | ||
| enum ApiType { | ||
| // REST-JSON legacy corresponds to the v1 API. | ||
| REST_LEGACY = 0; | ||
| // REST-JSON v2 API. The `canonical JSON encoding | ||
| // <https://developers.google.com/protocol-buffers/docs/proto3#json>`_ for | ||
| // the v2 protos is used. | ||
| REST = 1; | ||
| // gRPC v2 API. | ||
| GRPC = 2; | ||
| } | ||
| ApiType api_type = 1 [(validate.rules).enum.defined_only = true]; | ||
| // Multiple cluster names may be provided for REST_LEGACY/REST. If > 1 | ||
| // cluster is defined, clusters will be cycled through if any kind of failure | ||
| // occurs. | ||
| // | ||
| // .. note:: | ||
| // | ||
| // The cluster with name ``cluster_name`` must be statically defined and its | ||
| // type must not be ``EDS``. | ||
| repeated string cluster_names = 2; | ||
|
|
||
| // Multiple gRPC services be provided for GRPC. If > 1 cluster is defined, | ||
| // services will be cycled through if any kind of failure occurs. | ||
| // | ||
| // .. note:: | ||
| // | ||
| // If a gRPC service points to a ``cluster_name``, it must be statically | ||
| // defined and its type must not be ``EDS``. | ||
| repeated GrpcService grpc_services = 4; | ||
|
|
||
| // For REST APIs, the delay between successive polls. | ||
| google.protobuf.Duration refresh_delay = 3 [(gogoproto.stdduration) = true]; | ||
| } | ||
|
|
||
| // Aggregated Discovery Service (ADS) options. This is currently empty, but when | ||
| // set in :ref:`ConfigSource <envoy_api_msg_ConfigSource>` can be used to | ||
| // specify that ADS is to be used. | ||
| message AggregatedConfigSource { | ||
| } | ||
|
|
||
| // Configuration for :ref:`listeners <config_listeners>`, :ref:`clusters | ||
| // <config_cluster_manager_cluster>`, :ref:`routes | ||
| // <config_http_conn_man_route_table>`, :ref:`endpoints | ||
| // <arch_overview_service_discovery>` etc. may either be sourced from the | ||
| // filesystem or from an xDS API source. Filesystem configs are watched with | ||
| // inotify for updates. | ||
| message ConfigSource { | ||
| oneof config_source_specifier { | ||
| option (validate.required) = true; | ||
| // Path on the filesystem to source and watch for configuration updates. | ||
| // | ||
| // .. note:: | ||
| // | ||
| // The path to the source must exist at config load time. | ||
| string path = 1; | ||
| // API configuration source. | ||
| ApiConfigSource api_config_source = 2; | ||
| // When set, ADS will be used to fetch resources. The ADS API configuration | ||
| // source in the bootstrap configuration is used. | ||
| AggregatedConfigSource ads = 3; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,6 @@ api_proto_library( | |
| deps = [ | ||
| "//api:address", | ||
| "//api:base", | ||
| "//api:grpc_cluster", | ||
| "//api:grpc_service", | ||
| ], | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth documenting the difference between the two choices in the one-of? Maybe not, because this one is deprecated. But which gRPC client will get used in the deprecated case? Or is it even the same protocol between these two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix.