pub struct ApiConfigSource {
pub api_type: i32,
pub transport_api_version: i32,
pub cluster_names: Vec<String>,
pub grpc_services: Vec<GrpcService>,
pub refresh_delay: Option<Duration>,
pub request_timeout: Option<Duration>,
pub rate_limit_settings: Option<RateLimitSettings>,
pub set_node_on_first_message_only: bool,
pub config_validators: Vec<TypedExtensionConfig>,
}
Expand description
API configuration source. This identifies the API type and cluster that Envoy will use to fetch an xDS API. [#next-free-field: 10]
Fields§
§api_type: i32
API type (gRPC, REST, delta gRPC)
transport_api_version: i32
API version for xDS transport protocol. This describes the xDS gRPC/REST endpoint and version of [Delta]DiscoveryRequest/Response used on the wire.
cluster_names: Vec<String>
Cluster names should be used only with REST. If > 1 cluster is defined, clusters will be cycled through if any kind of failure occurs.
.. note::
The cluster with name cluster_name
must be statically defined and its
type must not be EDS
.
grpc_services: Vec<GrpcService>
Multiple gRPC services be provided for GRPC. If > 1 cluster is defined, services will be cycled through if any kind of failure occurs.
refresh_delay: Option<Duration>
For REST APIs, the delay between successive polls.
request_timeout: Option<Duration>
For REST APIs, the request timeout. If not set, a default value of 1s will be used.
rate_limit_settings: Option<RateLimitSettings>
For GRPC APIs, the rate limit settings. If present, discovery requests made by Envoy will be rate limited.
set_node_on_first_message_only: bool
Skip the node identifier in subsequent discovery requests for streaming gRPC config types.
config_validators: Vec<TypedExtensionConfig>
A list of config validators that will be executed when a new update is
received from the ApiConfigSource. Note that each validator handles a
specific xDS service type, and only the validators corresponding to the
type url (in :ref: DiscoveryResponse
or :ref: DeltaDiscoveryResponse
)
will be invoked.
If the validator returns false or throws an exception, the config will be rejected by
the client, and a NACK will be sent.
[#extension-category: envoy.config.validators]
Implementations§
Source§impl ApiConfigSource
impl ApiConfigSource
Sourcepub fn api_type(&self) -> ApiType
pub fn api_type(&self) -> ApiType
Returns the enum value of api_type
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_api_type(&mut self, value: ApiType)
pub fn set_api_type(&mut self, value: ApiType)
Sets api_type
to the provided enum value.
Sourcepub fn transport_api_version(&self) -> ApiVersion
pub fn transport_api_version(&self) -> ApiVersion
Returns the enum value of transport_api_version
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_transport_api_version(&mut self, value: ApiVersion)
pub fn set_transport_api_version(&mut self, value: ApiVersion)
Sets transport_api_version
to the provided enum value.
Trait Implementations§
Source§impl Clone for ApiConfigSource
impl Clone for ApiConfigSource
Source§fn clone(&self) -> ApiConfigSource
fn clone(&self) -> ApiConfigSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ApiConfigSource
impl Debug for ApiConfigSource
Source§impl Default for ApiConfigSource
impl Default for ApiConfigSource
Source§impl Message for ApiConfigSource
impl Message for ApiConfigSource
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl Name for ApiConfigSource
impl Name for ApiConfigSource
Source§const NAME: &'static str = "ApiConfigSource"
const NAME: &'static str = "ApiConfigSource"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "envoy.config.core.v3"
const PACKAGE: &'static str = "envoy.config.core.v3"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
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§impl PartialEq for ApiConfigSource
impl PartialEq for ApiConfigSource
impl StructuralPartialEq for ApiConfigSource
Auto Trait Implementations§
impl Freeze for ApiConfigSource
impl RefUnwindSafe for ApiConfigSource
impl Send for ApiConfigSource
impl Sync for ApiConfigSource
impl Unpin for ApiConfigSource
impl UnwindSafe for ApiConfigSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request