Struct google_api_proto::google::api::BackendRule
source · pub struct BackendRule {
pub selector: String,
pub address: String,
pub deadline: f64,
pub min_deadline: f64,
pub operation_deadline: f64,
pub path_translation: i32,
pub protocol: String,
pub overrides_by_request_protocol: BTreeMap<String, BackendRule>,
pub authentication: Option<Authentication>,
}
Expand description
A backend rule provides configuration for an individual API element.
Fields§
§selector: String
Selects the methods to which this rule applies.
Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
address: String
The address of the API backend.
The scheme is used to determine the backend protocol and security. The following schemes are accepted:
SCHEME PROTOCOL SECURITY
http:// HTTP None
https:// HTTP TLS
grpc:// gRPC None
grpcs:// gRPC TLS
It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms.
If the port is unspecified, the default is:
- 80 for schemes without TLS
- 443 for schemes with TLS
For HTTP backends, use [protocol][google.api.BackendRule.protocol] to specify the protocol version.
deadline: f64
The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.
min_deadline: f64
Deprecated, do not use.
operation_deadline: f64
The number of seconds to wait for the completion of a long running operation. The default is no deadline.
path_translation: i32
§protocol: String
The protocol used for sending a request to the backend. The supported values are “http/1.1” and “h2”.
The default value is inferred from the scheme in the [address][google.api.BackendRule.address] field:
SCHEME PROTOCOL
http:// http/1.1
https:// http/1.1
grpc:// h2
grpcs:// h2
For secure HTTP backends (https://) that support HTTP/2, set this field to “h2” for improved performance.
Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends.
See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.
overrides_by_request_protocol: BTreeMap<String, BackendRule>
The map between request protocol and the backend address.
authentication: Option<Authentication>
Authentication settings used by the backend.
These are typically used to provide service management functionality to
a backend served on a publicly-routable URL. The authentication
details should match the authentication behavior used by the backend.
For example, specifying jwt_audience
implies that the backend expects
authentication via a JWT.
When authentication is unspecified, the resulting behavior is the same
as disable_auth
set to true
.
Refer to https://developers.google.com/identity/protocols/OpenIDConnect for JWT ID token.
Implementations§
source§impl BackendRule
impl BackendRule
sourcepub fn path_translation(&self) -> PathTranslation
pub fn path_translation(&self) -> PathTranslation
Returns the enum value of path_translation
, or the default if the field is set to an invalid enum value.
sourcepub fn set_path_translation(&mut self, value: PathTranslation)
pub fn set_path_translation(&mut self, value: PathTranslation)
Sets path_translation
to the provided enum value.
Trait Implementations§
source§impl Clone for BackendRule
impl Clone for BackendRule
source§fn clone(&self) -> BackendRule
fn clone(&self) -> BackendRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BackendRule
impl Debug for BackendRule
source§impl Default for BackendRule
impl Default for BackendRule
source§impl Message for BackendRule
impl Message for BackendRule
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 BackendRule
impl PartialEq for BackendRule
source§fn eq(&self, other: &BackendRule) -> bool
fn eq(&self, other: &BackendRule) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BackendRule
Auto Trait Implementations§
impl Freeze for BackendRule
impl RefUnwindSafe for BackendRule
impl Send for BackendRule
impl Sync for BackendRule
impl Unpin for BackendRule
impl UnwindSafe for BackendRule
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