You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
185 lines
7.0 KiB
185 lines
7.0 KiB
8 years ago
|
syntax = "proto3";
|
||
|
|
||
7 years ago
|
package envoy.api.v2.core;
|
||
|
option go_package = "core";
|
||
8 years ago
|
|
||
8 years ago
|
import "google/protobuf/struct.proto";
|
||
8 years ago
|
import "google/protobuf/wrappers.proto";
|
||
8 years ago
|
|
||
7 years ago
|
import "validate/validate.proto";
|
||
7 years ago
|
import "gogoproto/gogo.proto";
|
||
7 years ago
|
|
||
7 years ago
|
option (gogoproto.equal_all) = true;
|
||
|
|
||
7 years ago
|
// [#protodoc-title: Common types]
|
||
7 years ago
|
|
||
8 years ago
|
// Identifies location of where either Envoy runs or where upstream hosts run.
|
||
|
message Locality {
|
||
7 years ago
|
// Region this :ref:`zone <envoy_api_field_core.Locality.zone>` belongs to.
|
||
8 years ago
|
string region = 1;
|
||
|
|
||
7 years ago
|
// Defines the local service zone where Envoy is running. Though optional, it
|
||
|
// should be set if discovery service routing is used and the discovery
|
||
|
// service exposes :ref:`zone data <config_cluster_manager_sds_api_host_az>`,
|
||
|
// either in this message or via :option:`--service-zone`. The meaning of zone
|
||
|
// is context dependent, e.g. `Availability Zone (AZ)
|
||
7 years ago
|
// <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`_
|
||
|
// on AWS, `Zone <https://cloud.google.com/compute/docs/regions-zones/>`_ on
|
||
|
// GCP, etc.
|
||
8 years ago
|
string zone = 2;
|
||
|
|
||
|
// When used for locality of upstream hosts, this field further splits zone
|
||
7 years ago
|
// into smaller chunks of sub-zones so they can be load balanced
|
||
|
// independently.
|
||
8 years ago
|
string sub_zone = 3;
|
||
|
}
|
||
|
|
||
7 years ago
|
// Identifies a specific Envoy instance. The node identifier is presented to the
|
||
|
// management server, which may use this identifier to distinguish per Envoy
|
||
|
// configuration for serving.
|
||
8 years ago
|
message Node {
|
||
7 years ago
|
// An opaque node identifier for the Envoy node. This also provides the local
|
||
|
// service node name. It should be set if any of the following features are
|
||
|
// used: :ref:`statsd <arch_overview_statistics>`, :ref:`CDS
|
||
|
// <config_cluster_manager_cds>`, and :ref:`HTTP tracing
|
||
|
// <arch_overview_tracing>`, either in this message or via
|
||
|
// :option:`--service-node`.
|
||
7 years ago
|
string id = 1;
|
||
7 years ago
|
|
||
|
// Defines the local service cluster name where Envoy is running. Though
|
||
|
// optional, it should be set if any of the following features are used:
|
||
|
// :ref:`statsd <arch_overview_statistics>`, :ref:`health check cluster
|
||
|
// verification <config_cluster_manager_cluster_hc_service_name>`,
|
||
|
// :ref:`runtime override directory <config_runtime_override_subdirectory>`,
|
||
|
// :ref:`user agent addition <config_http_conn_man_add_user_agent>`,
|
||
|
// :ref:`HTTP global rate limiting <config_http_filters_rate_limit>`,
|
||
|
// :ref:`CDS <config_cluster_manager_cds>`, and :ref:`HTTP tracing
|
||
|
// <arch_overview_tracing>`, either in this message or via
|
||
|
// :option:`--service-cluster`.
|
||
7 years ago
|
string cluster = 2;
|
||
7 years ago
|
|
||
7 years ago
|
// Opaque metadata extending the node identifier. Envoy will pass this
|
||
|
// directly to the management server.
|
||
7 years ago
|
google.protobuf.Struct metadata = 3;
|
||
7 years ago
|
|
||
7 years ago
|
// Locality specifying where the Envoy instance is running.
|
||
7 years ago
|
Locality locality = 4;
|
||
7 years ago
|
|
||
7 years ago
|
// This is motivated by informing a management server during canary which
|
||
7 years ago
|
// version of Envoy is being tested in a heterogeneous fleet. This will be set
|
||
|
// by Envoy in management server RPCs.
|
||
7 years ago
|
string build_version = 5;
|
||
8 years ago
|
}
|
||
8 years ago
|
|
||
8 years ago
|
// Metadata provides additional inputs to filters based on matched listeners,
|
||
8 years ago
|
// filter chains, routes and endpoints. It is structured as a map from filter
|
||
|
// name (in reverse DNS format) to metadata specific to the filter. Metadata
|
||
|
// key-values for a filter are merged as connection and request handling occurs,
|
||
|
// with later values for the same key overriding earlier values.
|
||
8 years ago
|
//
|
||
|
// An example use of metadata is providing additional values to
|
||
|
// http_connection_manager in the envoy.http_connection_manager.access_log
|
||
|
// namespace.
|
||
8 years ago
|
//
|
||
|
// For load balancing, Metadata provides a means to subset cluster endpoints.
|
||
|
// Endpoints have a Metadata object associated and routes contain a Metadata
|
||
|
// object to match against. There are some well defined metadata used today for
|
||
|
// this purpose:
|
||
7 years ago
|
//
|
||
7 years ago
|
// * ``{"envoy.lb": {"canary": <bool> }}`` This indicates the canary status of an
|
||
8 years ago
|
// endpoint and is also used during header processing
|
||
|
// (x-envoy-upstream-canary) and for stats purposes.
|
||
8 years ago
|
message Metadata {
|
||
7 years ago
|
// Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.*
|
||
|
// namespace is reserved for Envoy's built-in filters.
|
||
8 years ago
|
map<string, google.protobuf.Struct> filter_metadata = 1;
|
||
|
}
|
||
|
|
||
8 years ago
|
// Runtime derived uint32 with a default when not specified.
|
||
|
message RuntimeUInt32 {
|
||
|
// Default value if runtime value is not available.
|
||
|
uint32 default_value = 2;
|
||
|
|
||
7 years ago
|
// Runtime key to get value for comparison. This value is used if defined.
|
||
7 years ago
|
string runtime_key = 3 [(validate.rules).string.min_bytes = 1];
|
||
8 years ago
|
}
|
||
8 years ago
|
|
||
7 years ago
|
// Envoy supports :ref:`upstream priority routing
|
||
|
// <arch_overview_http_routing_priority>` both at the route and the virtual
|
||
8 years ago
|
// cluster level. The current priority implementation uses different connection
|
||
|
// pool and circuit breaking settings for each priority level. This means that
|
||
|
// even for HTTP/2 requests, two physical connections will be used to an
|
||
|
// upstream host. In the future Envoy will likely support true HTTP/2 priority
|
||
|
// over a single upstream connection.
|
||
|
enum RoutingPriority {
|
||
|
DEFAULT = 0;
|
||
|
HIGH = 1;
|
||
|
}
|
||
8 years ago
|
|
||
7 years ago
|
// HTTP request method.
|
||
7 years ago
|
enum RequestMethod {
|
||
7 years ago
|
option (gogoproto.goproto_enum_prefix) = false;
|
||
7 years ago
|
METHOD_UNSPECIFIED = 0;
|
||
|
GET = 1;
|
||
|
HEAD = 2;
|
||
|
POST = 3;
|
||
|
PUT = 4;
|
||
|
DELETE = 5;
|
||
|
CONNECT = 6;
|
||
|
OPTIONS = 7;
|
||
|
TRACE = 8;
|
||
|
}
|
||
|
|
||
8 years ago
|
// Header name/value pair.
|
||
|
message HeaderValue {
|
||
|
// Header name.
|
||
|
string key = 1;
|
||
|
|
||
|
// Header value.
|
||
7 years ago
|
//
|
||
|
// The same :ref:`format specifier <config_access_log_format>` as used for
|
||
|
// :ref:`HTTP access logging <config_access_log>` applies here, however
|
||
|
// unknown header values are replaced with the empty string instead of `-`.
|
||
8 years ago
|
string value = 2;
|
||
|
}
|
||
|
|
||
|
// Header name/value pair plus option to control append behavior.
|
||
|
message HeaderValueOption {
|
||
7 years ago
|
// Header name/value pair that this option applies to.
|
||
8 years ago
|
HeaderValue header = 1;
|
||
|
|
||
7 years ago
|
// Should the value be appended? If true (default), the value is appended to
|
||
7 years ago
|
// existing values.
|
||
8 years ago
|
google.protobuf.BoolValue append = 2;
|
||
|
}
|
||
8 years ago
|
|
||
7 years ago
|
// 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];
|
||
|
}
|
||
|
}
|
||
|
|
||
7 years ago
|
// Configuration for transport socket in :ref:`listeners <config_listeners>` and
|
||
|
// :ref:`clusters <config_cluster_manager_cluster>`. If the configuration is
|
||
|
// empty, a default transport socket implementation and configuration will be
|
||
|
// chosen based on the platform and existence of tls_context.
|
||
7 years ago
|
message TransportSocket {
|
||
|
// The name of the transport socket to instantiate. The name must match a supported transport
|
||
|
// socket implementation.
|
||
7 years ago
|
string name = 1 [(validate.rules).string.min_bytes = 1];
|
||
7 years ago
|
|
||
|
// Implementation specific configuration which depends on the implementation being instantiated.
|
||
|
// See the supported transport socket implementations for further documentation.
|
||
|
google.protobuf.Struct config = 2;
|
||
|
}
|