Common types¶
core.Locality¶
Identifies location of where either Envoy runs or where upstream hosts run.
{
"region": "...",
"zone": "...",
"sub_zone": "..."
}
- zone
(string) 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 zone data, either in this message or via
--service-zone
. The meaning of zone is context dependent, e.g. Availability Zone (AZ) on AWS, Zone on GCP, etc.
- sub_zone
(string) When used for locality of upstream hosts, this field further splits zone into smaller chunks of sub-zones so they can be load balanced independently.
core.Node¶
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.
{
"id": "...",
"cluster": "...",
"metadata": "{...}",
"locality": "{...}",
"build_version": "..."
}
- id
(string) 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: statsd, CDS, and HTTP tracing, either in this message or via
--service-node
.
- cluster
(string) Defines the local service cluster name where Envoy is running. Though optional, it should be set if any of the following features are used: statsd, health check cluster verification, runtime override directory, user agent addition, HTTP global rate limiting, CDS, and HTTP tracing, either in this message or via
--service-cluster
.
- metadata
(Struct) Opaque metadata extending the node identifier. Envoy will pass this directly to the management server.
- locality
(core.Locality) Locality specifying where the Envoy instance is running.
- build_version
(string) This is motivated by informing a management server during canary which version of Envoy is being tested in a heterogeneous fleet. This will be set by Envoy in management server RPCs.
core.Metadata¶
Metadata provides additional inputs to filters based on matched listeners, filter chains, routes and endpoints. It is structured as a map, usually 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.
An example use of metadata is providing additional values to http_connection_manager in the envoy.http_connection_manager.access_log namespace.
Another example use of metadata is to per service config info in cluster metadata, which may get consumed by multiple filters.
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:
{"envoy.lb": {"canary": <bool> }}
This indicates the canary status of an endpoint and is also used during header processing (x-envoy-upstream-canary) and for stats purposes.
{
"filter_metadata": "{...}"
}
core.RuntimeUInt32¶
Runtime derived uint32 with a default when not specified.
{
"default_value": "...",
"runtime_key": "..."
}
- default_value
(uint32) Default value if runtime value is not available.
- runtime_key
(string, REQUIRED) Runtime key to get value for comparison. This value is used if defined.
core.RuntimeFeatureFlag¶
[core.RuntimeFeatureFlag proto]
Runtime derived bool with a default when not specified.
{
"default_value": "{...}",
"runtime_key": "..."
}
- default_value
(BoolValue, REQUIRED) Default value if runtime value is not available.
- runtime_key
(string, REQUIRED) Runtime key to get value for comparison. This value is used if defined. The boolean value must be represented via its canonical JSON encoding.
core.HeaderValue¶
Header name/value pair.
{
"key": "...",
"value": "..."
}
- key
(string, REQUIRED) Header name.
- value
(string) Header value.
The same format specifier as used for HTTP access logging applies here, however unknown header values are replaced with the empty string instead of -.
core.HeaderValueOption¶
[core.HeaderValueOption proto]
Header name/value pair plus option to control append behavior.
{
"header": "{...}",
"append": "{...}"
}
- header
(core.HeaderValue, REQUIRED) Header name/value pair that this option applies to.
- append
(BoolValue) Should the value be appended? If true (default), the value is appended to existing values.
core.DataSource¶
Data source consisting of either a file or an inline value.
{
"filename": "...",
"inline_bytes": "...",
"inline_string": "..."
}
- filename
(string) Local filesystem data source.
Precisely one of filename, inline_bytes, inline_string must be set.
- inline_bytes
(bytes) Bytes inlined in the configuration.
Precisely one of filename, inline_bytes, inline_string must be set.
- inline_string
(string) String inlined in the configuration.
Precisely one of filename, inline_bytes, inline_string must be set.
core.RemoteDataSource¶
The message specifies how to fetch data from remote and how to verify it.
{
"http_uri": "{...}",
"sha256": "..."
}
- http_uri
(core.HttpUri, REQUIRED) The HTTP URI to fetch the remote data.
- sha256
(string, REQUIRED) SHA256 string for verifying data.
core.AsyncDataSource¶
Async data source which support async data fetch.
{
"local": "{...}",
"remote": "{...}"
}
- local
(core.DataSource) Local async data source.
- remote
(core.RemoteDataSource) Remote async data source.
core.TransportSocket¶
Configuration for transport socket in listeners and clusters. If the configuration is empty, a default transport socket implementation and configuration will be chosen based on the platform and existence of tls_context.
{
"name": "...",
"config": "{...}",
"typed_config": "{...}"
}
- name
(string, REQUIRED) The name of the transport socket to instantiate. The name must match a supported transport socket implementation.
- config
(Struct) Implementation specific configuration which depends on the implementation being instantiated. See the supported transport socket implementations for further documentation.
Only one of config, typed_config may be set.
- typed_config
(Any) Implementation specific configuration which depends on the implementation being instantiated. See the supported transport socket implementations for further documentation.
Only one of config, typed_config may be set.
core.SocketOption¶
Generic socket option message. This would be used to set socket options that might not exist in upstream kernels or precompiled Envoy binaries.
{
"description": "...",
"level": "...",
"name": "...",
"int_value": "...",
"buf_value": "...",
"state": "..."
}
- description
(string) An optional name to give this socket option for debugging, etc. Uniqueness is not required and no special meaning is assumed.
- level
(int64) Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP
- name
(int64) The numeric name as passed to setsockopt
- int_value
(int64) Because many sockopts take an int value.
- state
(core.SocketOption.SocketState) The state in which the option will be applied. When used in BindConfig STATE_PREBIND is currently the only valid value.
Enum core.SocketOption.SocketState¶
[core.SocketOption.SocketState proto]
- STATE_PREBIND
(DEFAULT) Socket options are applied after socket creation but before binding the socket to a port
- STATE_BOUND
Socket options are applied after binding the socket to a port but before calling listen()
- STATE_LISTENING
Socket options are applied after calling listen()
core.RuntimeFractionalPercent¶
[core.RuntimeFractionalPercent proto]
Runtime derived FractionalPercent with defaults for when the numerator or denominator is not specified via a runtime key.
Note
Parsing of the runtime key’s data is implemented such that it may be represented as a FractionalPercent proto represented as JSON/YAML and may also be represented as an integer with the assumption that the value is an integral percentage out of 100. For instance, a runtime key lookup returning the value “42” would parse as a FractionalPercent whose numerator is 42 and denominator is HUNDRED.
{
"default_value": "{...}",
"runtime_key": "..."
}
- default_value
(type.FractionalPercent, REQUIRED) Default value if the runtime value’s for the numerator/denominator keys are not available.
- runtime_key
(string) Runtime key for a YAML representation of a FractionalPercent.
core.ControlPlane¶
Identifies a specific ControlPlane instance that Envoy is connected to.
{
"identifier": "..."
}
- identifier
(string) An opaque control plane identifier that uniquely identifies an instance of control plane. This can be used to identify which control plane instance, the Envoy is connected to.
Enum core.RoutingPriority¶
Envoy supports upstream priority routing both at the route and the virtual 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.
- DEFAULT
(DEFAULT)
- HIGH
Enum core.RequestMethod¶
HTTP request method.
- METHOD_UNSPECIFIED
(DEFAULT)
- GET
- HEAD
- POST
- PUT
- DELETE
- CONNECT
- OPTIONS
- TRACE
- PATCH
Enum core.TrafficDirection¶
Identifies the direction of the traffic relative to the local Envoy.
- UNSPECIFIED
(DEFAULT) Default option is unspecified.
- INBOUND
The transport is used for incoming traffic.
- OUTBOUND
The transport is used for outgoing traffic.