|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package envoy.api.v2;
|
|
|
|
|
api: protoxform tool and API reformat. (#8309)
This patch introduces a new tool, protoxform, that will be the basis of
the v2 -> v3 migration tooling. It operates as a Python protoc plugin,
within the same framework as protodoc, and provides the ability to
operate on protoc AST input and generate proto output.
As a first step, the tool is applied reflexively on v2, and functions as
a formatting tool. In later patches, this will be added to
check_format/fix_format scripts and CI.
Part of #8082.
Risk level: medium (it's possible that some inadvertent wire changes
occur, if they do, this patch should be rolled back).
Testing: manual inspection of diff, bazel test //test/..., some
grep/diff scripts to ensure we haven't lost any comments.
Signed-off-by: Harvey Tuch <htuch@google.com>
Mirrored from https://github.com/envoyproxy/envoy @ 08b123a8321d359ea66cbbc0e2926545798dabd3
5 years ago
|
|
|
import "envoy/api/v2/discovery.proto";
|
|
|
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
|
|
|
import "validate/validate.proto";
|
|
|
|
|
|
|
|
option java_package = "io.envoyproxy.envoy.api.v2";
|
|
|
|
option java_outer_classname = "SrdsProto";
|
|
|
|
option java_multiple_files = true;
|
|
|
|
option java_generic_services = true;
|
|
|
|
|
|
|
|
// [#protodoc-title: HTTP scoped routing configuration]
|
|
|
|
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
|
|
|
|
|
|
|
|
// The Scoped Routes Discovery Service (SRDS) API distributes
|
|
|
|
// :ref:`ScopedRouteConfiguration<envoy_api_msg.ScopedRouteConfiguration>`
|
|
|
|
// resources. Each ScopedRouteConfiguration resource represents a "routing
|
|
|
|
// scope" containing a mapping that allows the HTTP connection manager to
|
|
|
|
// dynamically assign a routing table (specified via a
|
|
|
|
// :ref:`RouteConfiguration<envoy_api_msg_RouteConfiguration>` message) to each
|
|
|
|
// HTTP request.
|
|
|
|
service ScopedRoutesDiscoveryService {
|
|
|
|
rpc StreamScopedRoutes(stream DiscoveryRequest) returns (stream DiscoveryResponse) {
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc DeltaScopedRoutes(stream DeltaDiscoveryRequest) returns (stream DeltaDiscoveryResponse) {
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc FetchScopedRoutes(DiscoveryRequest) returns (DiscoveryResponse) {
|
|
|
|
option (google.api.http).post = "/v2/discovery:scoped-routes";
|
|
|
|
option (google.api.http).body = "*";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Specifies a routing scope, which associates a
|
|
|
|
// :ref:`Key<envoy_api_msg_ScopedRouteConfiguration.Key>` to a
|
|
|
|
// :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name).
|
|
|
|
//
|
|
|
|
// The HTTP connection manager builds up a table consisting of these Key to
|
|
|
|
// RouteConfiguration mappings, and looks up the RouteConfiguration to use per
|
|
|
|
// request according to the algorithm specified in the
|
|
|
|
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`
|
|
|
|
// assigned to the HttpConnectionManager.
|
|
|
|
//
|
|
|
|
// For example, with the following configurations (in YAML):
|
|
|
|
//
|
|
|
|
// HttpConnectionManager config:
|
|
|
|
//
|
|
|
|
// .. code::
|
|
|
|
//
|
|
|
|
// ...
|
|
|
|
// scoped_routes:
|
|
|
|
// name: foo-scoped-routes
|
|
|
|
// scope_key_builder:
|
|
|
|
// fragments:
|
|
|
|
// - header_value_extractor:
|
|
|
|
// name: X-Route-Selector
|
|
|
|
// element_separator: ,
|
|
|
|
// element:
|
|
|
|
// separator: =
|
|
|
|
// key: vip
|
|
|
|
//
|
|
|
|
// ScopedRouteConfiguration resources (specified statically via
|
|
|
|
// :ref:`scoped_route_configurations_list<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scoped_route_configurations_list>`
|
|
|
|
// or obtained dynamically via SRDS):
|
|
|
|
//
|
|
|
|
// .. code::
|
|
|
|
//
|
|
|
|
// (1)
|
|
|
|
// name: route-scope1
|
|
|
|
// route_configuration_name: route-config1
|
|
|
|
// key:
|
|
|
|
// fragments:
|
|
|
|
// - string_key: 172.10.10.20
|
|
|
|
//
|
|
|
|
// (2)
|
|
|
|
// name: route-scope2
|
|
|
|
// route_configuration_name: route-config2
|
|
|
|
// key:
|
|
|
|
// fragments:
|
|
|
|
// - string_key: 172.20.20.30
|
|
|
|
//
|
|
|
|
// A request from a client such as:
|
|
|
|
//
|
|
|
|
// .. code::
|
|
|
|
//
|
|
|
|
// GET / HTTP/1.1
|
|
|
|
// Host: foo.com
|
|
|
|
// X-Route-Selector: vip=172.10.10.20
|
|
|
|
//
|
|
|
|
// would result in the routing table defined by the `route-config1`
|
|
|
|
// RouteConfiguration being assigned to the HTTP request/stream.
|
|
|
|
//
|
|
|
|
message ScopedRouteConfiguration {
|
|
|
|
// Specifies a key which is matched against the output of the
|
|
|
|
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`
|
|
|
|
// specified in the HttpConnectionManager. The matching is done per HTTP
|
|
|
|
// request and is dependent on the order of the fragments contained in the
|
|
|
|
// Key.
|
|
|
|
message Key {
|
|
|
|
message Fragment {
|
|
|
|
oneof type {
|
|
|
|
option (validate.required) = true;
|
|
|
|
|
|
|
|
// A string to match against.
|
|
|
|
string string_key = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// The ordered set of fragments to match against. The order must match the
|
|
|
|
// fragments in the corresponding
|
|
|
|
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`.
|
api: protoxform tool and API reformat. (#8309)
This patch introduces a new tool, protoxform, that will be the basis of
the v2 -> v3 migration tooling. It operates as a Python protoc plugin,
within the same framework as protodoc, and provides the ability to
operate on protoc AST input and generate proto output.
As a first step, the tool is applied reflexively on v2, and functions as
a formatting tool. In later patches, this will be added to
check_format/fix_format scripts and CI.
Part of #8082.
Risk level: medium (it's possible that some inadvertent wire changes
occur, if they do, this patch should be rolled back).
Testing: manual inspection of diff, bazel test //test/..., some
grep/diff scripts to ensure we haven't lost any comments.
Signed-off-by: Harvey Tuch <htuch@google.com>
Mirrored from https://github.com/envoyproxy/envoy @ 08b123a8321d359ea66cbbc0e2926545798dabd3
5 years ago
|
|
|
repeated Fragment fragments = 1 [(validate.rules).repeated = {min_items: 1}];
|
|
|
|
}
|
|
|
|
|
api: protoxform tool and API reformat. (#8309)
This patch introduces a new tool, protoxform, that will be the basis of
the v2 -> v3 migration tooling. It operates as a Python protoc plugin,
within the same framework as protodoc, and provides the ability to
operate on protoc AST input and generate proto output.
As a first step, the tool is applied reflexively on v2, and functions as
a formatting tool. In later patches, this will be added to
check_format/fix_format scripts and CI.
Part of #8082.
Risk level: medium (it's possible that some inadvertent wire changes
occur, if they do, this patch should be rolled back).
Testing: manual inspection of diff, bazel test //test/..., some
grep/diff scripts to ensure we haven't lost any comments.
Signed-off-by: Harvey Tuch <htuch@google.com>
Mirrored from https://github.com/envoyproxy/envoy @ 08b123a8321d359ea66cbbc0e2926545798dabd3
5 years ago
|
|
|
// The name assigned to the routing scope.
|
|
|
|
string name = 1 [(validate.rules).string = {min_bytes: 1}];
|
|
|
|
|
|
|
|
// The resource name to use for a :ref:`envoy_api_msg_DiscoveryRequest` to an
|
|
|
|
// RDS server to fetch the :ref:`envoy_api_msg_RouteConfiguration` associated
|
|
|
|
// with this scope.
|
api: protoxform tool and API reformat. (#8309)
This patch introduces a new tool, protoxform, that will be the basis of
the v2 -> v3 migration tooling. It operates as a Python protoc plugin,
within the same framework as protodoc, and provides the ability to
operate on protoc AST input and generate proto output.
As a first step, the tool is applied reflexively on v2, and functions as
a formatting tool. In later patches, this will be added to
check_format/fix_format scripts and CI.
Part of #8082.
Risk level: medium (it's possible that some inadvertent wire changes
occur, if they do, this patch should be rolled back).
Testing: manual inspection of diff, bazel test //test/..., some
grep/diff scripts to ensure we haven't lost any comments.
Signed-off-by: Harvey Tuch <htuch@google.com>
Mirrored from https://github.com/envoyproxy/envoy @ 08b123a8321d359ea66cbbc0e2926545798dabd3
5 years ago
|
|
|
string route_configuration_name = 2 [(validate.rules).string = {min_bytes: 1}];
|
|
|
|
|
|
|
|
// The key to match against.
|
api: protoxform tool and API reformat. (#8309)
This patch introduces a new tool, protoxform, that will be the basis of
the v2 -> v3 migration tooling. It operates as a Python protoc plugin,
within the same framework as protodoc, and provides the ability to
operate on protoc AST input and generate proto output.
As a first step, the tool is applied reflexively on v2, and functions as
a formatting tool. In later patches, this will be added to
check_format/fix_format scripts and CI.
Part of #8082.
Risk level: medium (it's possible that some inadvertent wire changes
occur, if they do, this patch should be rolled back).
Testing: manual inspection of diff, bazel test //test/..., some
grep/diff scripts to ensure we haven't lost any comments.
Signed-off-by: Harvey Tuch <htuch@google.com>
Mirrored from https://github.com/envoyproxy/envoy @ 08b123a8321d359ea66cbbc0e2926545798dabd3
5 years ago
|
|
|
Key key = 3 [(validate.rules).message = {required: true}];
|
|
|
|
}
|