Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions api/base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,22 @@ message HeaderValueOption {
google.protobuf.BoolValue append = 2;
}

// Data source consisting of either a file or an inline value.
message DataSource {
oneof specifier {
option (validate.required) = true;

// Local filesystem data source.
string filename = 1 [(validate.rules).string.min_bytes = 1];

// Bytes inlined in the configuration.
bytes inline_bytes = 2 [(validate.rules).bytes.min_len = 1];

// String inlined in the configuration.
string inline_string = 3 [(validate.rules).string.min_bytes = 1];
}
}

// API configuration source. This identifies the API type and cluster that Envoy
// will use to fetch an xDS API.
message ApiConfigSource {
Expand Down
17 changes: 17 additions & 0 deletions api/rds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ message Route {

// Return a redirect.
RedirectAction redirect = 3;

// [#not-implemented-hide:] Return an arbitrary HTTP response directly, without proxying.
DirectResponseAction direct_response = 7;
}

// The Metadata field can be used to provide additional information
Expand Down Expand Up @@ -585,6 +588,20 @@ message RedirectAction {
RedirectResponseCode response_code = 3 [(validate.rules).enum.defined_only = true];
}

message DirectResponseAction {
// Specifies the HTTP response status to be returned.
uint32 status = 1 [(validate.rules).uint32 = {gte: 100, lt: 600}];

// Specifies the content of the response body. If this setting is omitted,
// no body is included in the generated response.
//
// .. note::
//
// Headers can be specified using *response_headers_to_add* in
// :ref:`envoy_api_msg_RouteConfiguration`.
DataSource body = 2;
}

message Decorator {
// The operation name associated with the request matched to this route. If tracing is
// enabled, this information will be used as the span name reported for this request.
Expand Down
12 changes: 0 additions & 12 deletions api/sds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@ service SecretDiscoveryService {
}
}

message DataSource {
oneof specifier {
option (validate.required) = true;

// Local filesystem data source.
string filename = 1 [(validate.rules).string.min_bytes = 1];

// Bytes inlined in the configuration.
bytes inline = 2 [(validate.rules).bytes.min_len = 1];
}
}

message TlsParameters {
enum TlsProtocol {
// Envoy will choose the optimal TLS version.
Expand Down