Struct gapi_grpc::google::api::BackendRule[][src]

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 authentication: Option<Authentication>,
}

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:

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

Minimum deadline in seconds needed for this method. Calls having deadline value lower than this will be rejected.

operation_deadline: f64

The number of seconds to wait for the completion of a long running operation. The default is no deadline.

path_translation: i32protocol: 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.

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

impl BackendRule[src]

pub fn path_translation(&self) -> PathTranslation[src]

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

pub fn set_path_translation(&mut self, value: PathTranslation)[src]

Sets path_translation to the provided enum value.

Trait Implementations

impl Clone for BackendRule[src]

impl Debug for BackendRule[src]

impl Default for BackendRule[src]

impl Message for BackendRule[src]

impl PartialEq<BackendRule> for BackendRule[src]

impl StructuralPartialEq for BackendRule[src]

Auto Trait Implementations

impl RefUnwindSafe for BackendRule

impl Send for BackendRule

impl Sync for BackendRule

impl Unpin for BackendRule

impl UnwindSafe for BackendRule

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]