Struct k8s_gateway_api::BackendRef
source · [−]pub struct BackendRef {
pub weight: Option<u16>,
pub name: String,
pub port: PortNumber,
}Expand description
BackendRef defines how a Route should forward a request to a Kubernetes resource.
Note that when a namespace is specified, a ReferencePolicy object is required in the referent namespace to allow that namespace’s owner to accept the reference. See the ReferencePolicy documentation for details.
Fields
weight: Option<u16>Weight specifies the proportion of requests forwarded to the referenced backend. This is computed as weight/(sum of all weights in this BackendRefs list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. Weight is not a percentage and the sum of weights does not need to equal 100.
If only one backend is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weight is set to 0, no traffic should be forwarded for this entry. If unspecified, weight defaults to 1.
Support for this field varies based on the context where used.
name: Stringport: PortNumberTrait Implementations
sourceimpl Clone for BackendRef
impl Clone for BackendRef
sourcefn clone(&self) -> BackendRef
fn clone(&self) -> BackendRef
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for BackendRef
impl Debug for BackendRef
sourceimpl<'de> Deserialize<'de> for BackendRef
impl<'de> Deserialize<'de> for BackendRef
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
sourceimpl JsonSchema for BackendRef
impl JsonSchema for BackendRef
sourcefn schema_name() -> String
fn schema_name() -> String
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more