Struct google_api_proto::google::cloud::networkservices::v1::extension_chain::Extension
source · pub struct Extension {
pub name: String,
pub authority: String,
pub service: String,
pub supported_events: Vec<i32>,
pub timeout: Option<Duration>,
pub fail_open: bool,
pub forward_headers: Vec<String>,
}
Expand description
A single extension in the chain to execute for the matching request.
Fields§
§name: String
Required. The name for this extension. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.
Optional. The :authority
header in the gRPC request sent from Envoy
to the extension service.
Required for Callout extensions.
service: String
Required. The reference to the service that runs the extension.
Currently only callout extensions are supported here.
To configure a callout extension, service
must be a fully-qualified
reference
to a backend
service
in the format:
<https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}
>
or
<https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}
.>
supported_events: Vec<i32>
Optional. A set of events during request or response processing for which
this extension is called. This field is required for the
LbTrafficExtension
resource. It must not be set for the
LbRouteExtension
resource.
timeout: Option<Duration>
Optional. Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds. Required for Callout extensions.
fail_open: bool
Optional. Determines how the proxy behaves if the call to the extension fails or times out.
When set to TRUE
, request or response processing continues without
error. Any subsequent extensions in the extension chain are also
executed. When set to FALSE
or the default setting of FALSE
is used,
one of the following happens:
-
If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer.
-
If response headers have been delivered, then the HTTP stream to the downstream client is reset.
forward_headers: Vec<String>
Optional. List of the HTTP headers to forward to the extension (from the client or backend). If omitted, all headers are sent. Each element is a string indicating the header name.
Implementations§
source§impl Extension
impl Extension
sourcepub fn supported_events(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<EventType>>
pub fn supported_events( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<EventType>>
Returns an iterator which yields the valid enum values contained in supported_events
.
sourcepub fn push_supported_events(&mut self, value: EventType)
pub fn push_supported_events(&mut self, value: EventType)
Appends the provided enum value to supported_events
.
Trait Implementations§
source§impl Message for Extension
impl Message for Extension
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 PartialEq for Extension
impl PartialEq for Extension
impl StructuralPartialEq for Extension
Auto Trait Implementations§
impl Freeze for Extension
impl RefUnwindSafe for Extension
impl Send for Extension
impl Sync for Extension
impl Unpin for Extension
impl UnwindSafe for Extension
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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