Struct Cluster

Source
pub struct Cluster {
Show 46 fields pub transport_socket_matches: Vec<TransportSocketMatch>, pub name: String, pub alt_stat_name: String, pub eds_cluster_config: Option<EdsClusterConfig>, pub connect_timeout: Option<Duration>, pub per_connection_buffer_limit_bytes: Option<UInt32Value>, pub lb_policy: i32, pub load_assignment: Option<ClusterLoadAssignment>, pub health_checks: Vec<HealthCheck>, pub max_requests_per_connection: Option<UInt32Value>, pub circuit_breakers: Option<CircuitBreakers>, pub upstream_http_protocol_options: Option<UpstreamHttpProtocolOptions>, pub common_http_protocol_options: Option<HttpProtocolOptions>, pub http_protocol_options: Option<Http1ProtocolOptions>, pub http2_protocol_options: Option<Http2ProtocolOptions>, pub typed_extension_protocol_options: HashMap<String, Any>, pub dns_refresh_rate: Option<Duration>, pub dns_failure_refresh_rate: Option<RefreshRate>, pub respect_dns_ttl: bool, pub dns_lookup_family: i32, pub dns_resolvers: Vec<Address>, pub use_tcp_for_dns_lookups: bool, pub dns_resolution_config: Option<DnsResolutionConfig>, pub typed_dns_resolver_config: Option<TypedExtensionConfig>, pub wait_for_warm_on_init: Option<BoolValue>, pub outlier_detection: Option<OutlierDetection>, pub cleanup_interval: Option<Duration>, pub upstream_bind_config: Option<BindConfig>, pub lb_subset_config: Option<LbSubsetConfig>, pub common_lb_config: Option<CommonLbConfig>, pub transport_socket: Option<TransportSocket>, pub metadata: Option<Metadata>, pub protocol_selection: i32, pub upstream_connection_options: Option<UpstreamConnectionOptions>, pub close_connections_on_host_health_failure: bool, pub ignore_health_on_host_removal: bool, pub filters: Vec<Filter>, pub load_balancing_policy: Option<LoadBalancingPolicy>, pub lrs_server: Option<ConfigSource>, pub track_timeout_budgets: bool, pub upstream_config: Option<TypedExtensionConfig>, pub track_cluster_stats: Option<TrackClusterStats>, pub preconnect_policy: Option<PreconnectPolicy>, pub connection_pool_per_downstream_connection: bool, pub cluster_discovery_type: Option<ClusterDiscoveryType>, pub lb_config: Option<LbConfig>,
}
Expand description

Configuration for a single upstream cluster. [#next-free-field: 57]

Fields§

§transport_socket_matches: Vec<TransportSocketMatch>

Configuration to use different transport sockets for different endpoints. The entry of envoy.transport_socket_match in the :ref:LbEndpoint.Metadata <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.metadata> is used to match against the transport sockets as they appear in the list. The first :ref:match <envoy_v3_api_msg_config.cluster.v3.Cluster.TransportSocketMatch> is used. For example, with the following match

.. code-block:: yaml

transport_socket_matches:

  • name: “enableMTLS” match: acceptMTLS: true transport_socket: name: envoy.transport_sockets.tls config: { … } # tls socket configuration
  • name: “defaultToPlaintext” match: {} transport_socket: name: envoy.transport_sockets.raw_buffer

Connections to the endpoints whose metadata value under envoy.transport_socket_match having “acceptMTLS”/“true” key/value pair use the “enableMTLS” socket configuration.

If a :ref:socket match <envoy_v3_api_msg_config.cluster.v3.Cluster.TransportSocketMatch> with empty match criteria is provided, that always match any endpoint. For example, the “defaultToPlaintext” socket match in case above.

If an endpoint metadata’s value under envoy.transport_socket_match does not match any TransportSocketMatch, socket configuration fallbacks to use the tls_context or transport_socket specified in this cluster.

This field allows gradual and flexible transport socket configuration changes.

The metadata of endpoints in EDS can indicate transport socket capabilities. For example, an endpoint’s metadata can have two key value pairs as “acceptMTLS”: “true”, “acceptPlaintext”: “true”. While some other endpoints, only accepting plaintext traffic has “acceptPlaintext”: “true” metadata information.

Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS traffic for endpoints with “acceptMTLS”: “true”, by adding a corresponding TransportSocketMatch in this field. Other client Envoys receive CDS without transport_socket_match set, and still send plain text traffic to the same cluster.

This field can be used to specify custom transport socket configurations for health checks by adding matching key/value pairs in a health check’s :ref:transport socket match criteria <envoy_v3_api_field_config.core.v3.HealthCheck.transport_socket_match_criteria> field.

[#comment:TODO(incfly): add a detailed architecture doc on intended usage.]

§name: String

Supplies the name of the cluster which must be unique across all clusters. The cluster name is used when emitting :ref:statistics <config_cluster_manager_cluster_stats> if :ref:alt_stat_name <envoy_v3_api_field_config.cluster.v3.Cluster.alt_stat_name> is not provided. Any : in the cluster name will be converted to _ when emitting statistics.

§alt_stat_name: String

An optional alternative to the cluster name to be used for observability. This name is used emitting stats for the cluster and access logging the cluster name. This will appear as additional information in configuration dumps of a cluster’s current status as :ref:observability_name <envoy_v3_api_field_admin.v3.ClusterStatus.observability_name> and as an additional tag “upstream_cluster.name” while tracing. Note: Any : in the name will be converted to _ when emitting statistics. This should not be confused with :ref:Router Filter Header <config_http_filters_router_x-envoy-upstream-alt-stat-name>.

§eds_cluster_config: Option<EdsClusterConfig>

Configuration to use for EDS updates for the Cluster.

§connect_timeout: Option<Duration>

The timeout for new network connections to hosts in the cluster. If not set, a default value of 5s will be used.

§per_connection_buffer_limit_bytes: Option<UInt32Value>

Soft limit on size of the cluster’s connections read and write buffers. If unspecified, an implementation defined default is applied (1MiB).

§lb_policy: i32

The :ref:load balancer type <arch_overview_load_balancing_types> to use when picking a host in the cluster.

§load_assignment: Option<ClusterLoadAssignment>

Setting this is required for specifying members of :ref:STATIC<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STATIC>, :ref:STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS> or :ref:LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS> clusters. This field supersedes the hosts field in the v2 API.

.. attention::

Setting this allows non-EDS cluster types to contain embedded EDS equivalent :ref:endpoint assignments<envoy_v3_api_msg_config.endpoint.v3.ClusterLoadAssignment>.

§health_checks: Vec<HealthCheck>

Optional :ref:active health checking <arch_overview_health_checking> configuration for the cluster. If no configuration is specified no health checking will be done and all cluster members will be considered healthy at all times.

§max_requests_per_connection: Option<UInt32Value>
👎Deprecated

Optional maximum requests for a single upstream connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 connection pool implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.

.. attention:: This field has been deprecated in favor of the :ref:max_requests_per_connection <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_requests_per_connection> field.

§circuit_breakers: Option<CircuitBreakers>

Optional :ref:circuit breaking <arch_overview_circuit_break> for the cluster.

§upstream_http_protocol_options: Option<UpstreamHttpProtocolOptions>
👎Deprecated

HTTP protocol options that are applied only to upstream HTTP connections. These options apply to all HTTP versions. This has been deprecated in favor of :ref:upstream_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.upstream_http_protocol_options> in the :ref:http_protocol_options <envoy_v3_api_msg_extensions.upstreams.http.v3.HttpProtocolOptions> message. upstream_http_protocol_options can be set via the cluster’s :ref:extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>. See :ref:upstream_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.upstream_http_protocol_options> for example usage.

§common_http_protocol_options: Option<HttpProtocolOptions>
👎Deprecated

Additional options when handling HTTP requests upstream. These options will be applicable to both HTTP1 and HTTP2 requests. This has been deprecated in favor of :ref:common_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.common_http_protocol_options> in the :ref:http_protocol_options <envoy_v3_api_msg_extensions.upstreams.http.v3.HttpProtocolOptions> message. common_http_protocol_options can be set via the cluster’s :ref:extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>. See :ref:upstream_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.upstream_http_protocol_options> for example usage.

§http_protocol_options: Option<Http1ProtocolOptions>
👎Deprecated

Additional options when handling HTTP1 requests. This has been deprecated in favor of http_protocol_options fields in the :ref:http_protocol_options <envoy_v3_api_msg_extensions.upstreams.http.v3.HttpProtocolOptions> message. http_protocol_options can be set via the cluster’s :ref:extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>. See :ref:upstream_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.upstream_http_protocol_options> for example usage.

§http2_protocol_options: Option<Http2ProtocolOptions>
👎Deprecated

Even if default HTTP2 protocol options are desired, this field must be set so that Envoy will assume that the upstream supports HTTP/2 when making new HTTP connection pool connections. Currently, Envoy only supports prior knowledge for upstream connections. Even if TLS is used with ALPN, http2_protocol_options must be specified. As an aside this allows HTTP/2 connections to happen over plain text. This has been deprecated in favor of http2_protocol_options fields in the :ref:http_protocol_options <envoy_v3_api_msg_extensions.upstreams.http.v3.HttpProtocolOptions> message. http2_protocol_options can be set via the cluster’s :ref:extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>. See :ref:upstream_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.upstream_http_protocol_options> for example usage.

§typed_extension_protocol_options: HashMap<String, Any>

The extension_protocol_options field is used to provide extension-specific protocol options for upstream connections. The key should match the extension filter name, such as “envoy.filters.network.thrift_proxy”. See the extension’s documentation for details on specific options. [#next-major-version: make this a list of typed extensions.]

§dns_refresh_rate: Option<Duration>

If the DNS refresh rate is specified and the cluster type is either :ref:STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>, or :ref:LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>, this value is used as the cluster’s DNS refresh rate. The value configured must be at least 1ms. If this setting is not specified, the value defaults to 5000ms. For cluster types other than :ref:STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS> and :ref:LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS> this setting is ignored.

§dns_failure_refresh_rate: Option<RefreshRate>

If the DNS failure refresh rate is specified and the cluster type is either :ref:STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>, or :ref:LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>, this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types other than :ref:STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS> and :ref:LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS> this setting is ignored.

§respect_dns_ttl: bool

Optional configuration for setting cluster’s DNS refresh rate. If the value is set to true, cluster’s DNS refresh rate will be set to resource record’s TTL which comes from DNS resolution.

§dns_lookup_family: i32

The DNS IP address resolution policy. If this setting is not specified, the value defaults to :ref:AUTO<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DnsLookupFamily.AUTO>.

§dns_resolvers: Vec<Address>
👎Deprecated

If DNS resolvers are specified and the cluster type is either :ref:STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>, or :ref:LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>, this value is used to specify the cluster’s dns resolvers. If this setting is not specified, the value defaults to the default resolver, which uses /etc/resolv.conf for configuration. For cluster types other than :ref:STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS> and :ref:LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS> this setting is ignored. This field is deprecated in favor of dns_resolution_config which aggregates all of the DNS resolver configuration in a single message.

§use_tcp_for_dns_lookups: bool
👎Deprecated

Always use TCP queries instead of UDP queries for DNS lookups. This field is deprecated in favor of dns_resolution_config which aggregates all of the DNS resolver configuration in a single message.

§dns_resolution_config: Option<DnsResolutionConfig>
👎Deprecated

DNS resolution configuration which includes the underlying dns resolver addresses and options. This field is deprecated in favor of :ref:typed_dns_resolver_config <envoy_v3_api_field_config.cluster.v3.Cluster.typed_dns_resolver_config>.

§typed_dns_resolver_config: Option<TypedExtensionConfig>

DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, or any other DNS resolver types and the related parameters. For example, an object of :ref:CaresDnsResolverConfig <envoy_v3_api_msg_extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig> can be packed into this typed_dns_resolver_config. This configuration replaces the :ref:dns_resolution_config <envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolution_config> configuration. During the transition period when both dns_resolution_config and typed_dns_resolver_config exists, when typed_dns_resolver_config is in place, Envoy will use it and ignore dns_resolution_config. When typed_dns_resolver_config is missing, the default behavior is in place. [#extension-category: envoy.network.dns_resolver]

§wait_for_warm_on_init: Option<BoolValue>

Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for :ref:STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>, or :ref:LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>, or :ref:Redis Cluster<arch_overview_redis>. If true, cluster readiness blocks on warm-up. If false, the cluster will complete initialization whether or not warm-up has completed. Defaults to true.

§outlier_detection: Option<OutlierDetection>

If specified, outlier detection will be enabled for this upstream cluster. Each of the configuration values can be overridden via :ref:runtime values <config_cluster_manager_cluster_runtime_outlier_detection>.

§cleanup_interval: Option<Duration>

The interval for removing stale hosts from a cluster type :ref:ORIGINAL_DST<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.ORIGINAL_DST>. Hosts are considered stale if they have not been used as upstream destinations during this interval. New hosts are added to original destination clusters on demand as new connections are redirected to Envoy, causing the number of hosts in the cluster to grow over time. Hosts that are not stale (they are actively used as destinations) are kept in the cluster, which allows connections to them remain open, saving the latency that would otherwise be spent on opening new connections. If this setting is not specified, the value defaults to 5000ms. For cluster types other than :ref:ORIGINAL_DST<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.ORIGINAL_DST> this setting is ignored.

§upstream_bind_config: Option<BindConfig>

Optional configuration used to bind newly established upstream connections. This overrides any bind_config specified in the bootstrap proto. If the address and port are empty, no bind will be performed.

§lb_subset_config: Option<LbSubsetConfig>

Configuration for load balancing subsetting.

§common_lb_config: Option<CommonLbConfig>

Common configuration for all load balancer implementations.

§transport_socket: Option<TransportSocket>

Optional custom transport socket implementation to use for upstream connections. To setup TLS, set a transport socket with name envoy.transport_sockets.tls and :ref:UpstreamTlsContexts <envoy_v3_api_msg_extensions.transport_sockets.tls.v3.UpstreamTlsContext> in the typed_config. If no transport socket configuration is specified, new connections will be set up with plaintext.

§metadata: Option<Metadata>

The Metadata field can be used to provide additional information about the cluster. It can be used for stats, logging, and varying filter behavior. Fields should use reverse DNS notation to denote which entity within Envoy will need the information. For instance, if the metadata is intended for the Router filter, the filter name should be specified as envoy.filters.http.router.

§protocol_selection: i32
👎Deprecated

Determines how Envoy selects the protocol used to speak to upstream hosts. This has been deprecated in favor of setting explicit protocol selection in the :ref:http_protocol_options <envoy_v3_api_msg_extensions.upstreams.http.v3.HttpProtocolOptions> message. http_protocol_options can be set via the cluster’s :ref:extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>.

§upstream_connection_options: Option<UpstreamConnectionOptions>

Optional options for upstream connections.

§close_connections_on_host_health_failure: bool

If an upstream host becomes unhealthy (as determined by the configured health checks or outlier detection), immediately close all connections to the failed host.

.. note::

This is currently only supported for connections created by tcp_proxy.

.. note::

The current implementation of this feature closes all connections immediately when the unhealthy status is detected. If there are a large number of connections open to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of time exclusively closing these connections, and not processing any other traffic.

§ignore_health_on_host_removal: bool

If set to true, Envoy will ignore the health value of a host when processing its removal from service discovery. This means that if active health checking is used, Envoy will not wait for the endpoint to go unhealthy before removing it.

§filters: Vec<Filter>

An (optional) network filter chain, listed in the order the filters should be applied. The chain will be applied to all outgoing connections that Envoy makes to the upstream servers of this cluster.

§load_balancing_policy: Option<LoadBalancingPolicy>

If this field is set and is supported by the client, it will supersede the value of :ref:lb_policy<envoy_v3_api_field_config.cluster.v3.Cluster.lb_policy>.

§lrs_server: Option<ConfigSource>

[#not-implemented-hide:] If present, tells the client where to send load reports via LRS. If not present, the client will fall back to a client-side default, which may be either (a) don’t send any load reports or (b) send load reports for all clusters to a single default server (which may be configured in the bootstrap file).

Note that if multiple clusters point to the same LRS server, the client may choose to create a separate stream for each cluster or it may choose to coalesce the data for multiple clusters onto a single stream. Either way, the client must make sure to send the data for any given cluster on no more than one stream.

[#next-major-version: In the v3 API, we should consider restructuring this somehow, maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation from the LRS stream here.]

§track_timeout_budgets: bool
👎Deprecated

If track_timeout_budgets is true, the :ref:timeout budget histograms <config_cluster_manager_cluster_stats_timeout_budgets> will be published for each request. These show what percentage of a request’s per try and global timeout was used. A value of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value of 100 would indicate that the request took the entirety of the timeout given to it.

.. attention::

This field has been deprecated in favor of timeout_budgets, part of :ref:track_cluster_stats <envoy_v3_api_field_config.cluster.v3.Cluster.track_cluster_stats>.

§upstream_config: Option<TypedExtensionConfig>

Optional customization and configuration of upstream connection pool, and upstream type.

Currently this field only applies for HTTP traffic but is designed for eventual use for custom TCP upstreams.

For HTTP traffic, Envoy will generally take downstream HTTP and send it upstream as upstream HTTP, using the http connection pool and the codec from http2_protocol_options

For routes where CONNECT termination is configured, Envoy will take downstream CONNECT requests and forward the CONNECT payload upstream over raw TCP using the tcp connection pool.

The default pool used is the generic connection pool which creates the HTTP upstream for most HTTP requests, and the TCP upstream if CONNECT termination is configured.

If users desire custom connection pool or upstream behavior, for example terminating CONNECT only if a custom filter indicates it is appropriate, the custom factories can be registered and configured here. [#extension-category: envoy.upstreams]

§track_cluster_stats: Option<TrackClusterStats>

Configuration to track optional cluster stats.

§preconnect_policy: Option<PreconnectPolicy>

Preconnect configuration for this cluster.

§connection_pool_per_downstream_connection: bool

If connection_pool_per_downstream_connection is true, the cluster will use a separate connection pool for every downstream connection

§cluster_discovery_type: Option<ClusterDiscoveryType>§lb_config: Option<LbConfig>

Optional configuration for the load balancing algorithm selected by LbPolicy. Currently only :ref:RING_HASH<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.RING_HASH>, :ref:MAGLEV<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.MAGLEV> and :ref:LEAST_REQUEST<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.LEAST_REQUEST> has additional configuration options. Specifying ring_hash_lb_config or maglev_lb_config or least_request_lb_config without setting the corresponding LbPolicy will generate an error at runtime.

Implementations§

Source§

impl Cluster

Source

pub fn lb_policy(&self) -> LbPolicy

Returns the enum value of lb_policy, or the default if the field is set to an invalid enum value.

Source

pub fn set_lb_policy(&mut self, value: LbPolicy)

Sets lb_policy to the provided enum value.

Source

pub fn dns_lookup_family(&self) -> DnsLookupFamily

Returns the enum value of dns_lookup_family, or the default if the field is set to an invalid enum value.

Source

pub fn set_dns_lookup_family(&mut self, value: DnsLookupFamily)

Sets dns_lookup_family to the provided enum value.

Source

pub fn protocol_selection(&self) -> ClusterProtocolSelection

Returns the enum value of protocol_selection, or the default if the field is set to an invalid enum value.

Source

pub fn set_protocol_selection(&mut self, value: ClusterProtocolSelection)

Sets protocol_selection to the provided enum value.

Trait Implementations§

Source§

impl Clone for Cluster

Source§

fn clone(&self) -> Cluster

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Cluster

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Cluster

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for Cluster

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl Name for Cluster

Source§

const NAME: &'static str = "Cluster"

Simple name for this Message. This name is the same as it appears in the source .proto file, e.g. FooBar.
Source§

const PACKAGE: &'static str = "envoy.config.cluster.v3"

Package name this message type is contained in. They are domain-like and delimited by ., e.g. google.protobuf.
Source§

fn full_name() -> String

Fully-qualified unique name for this Message. It’s prefixed with the package name and names of any parent messages, e.g. google.rpc.BadRequest.FieldViolation. By default, this is the package name followed by the message name. Fully-qualified names must be unique within a domain of Type URLs.
Source§

fn type_url() -> String

Type URL for this Message, which by default is the full name with a leading slash, but may also include a leading domain name, e.g. type.googleapis.com/google.profile.Person. This can be used when serializing into the google.protobuf.Any type.
Source§

impl PartialEq for Cluster

Source§

fn eq(&self, other: &Cluster) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Cluster

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more