pub struct BackendRef {
pub weight: Option<u16>,
pub inner: BackendObjectReference,
}
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.
inner: BackendObjectReference
BackendObjectReference references a Kubernetes object.
Trait Implementations§
Source§impl Clone for BackendRef
impl Clone for BackendRef
Source§fn clone(&self) -> BackendRef
fn clone(&self) -> BackendRef
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BackendRef
impl Debug for BackendRef
Source§impl<'de> Deserialize<'de> for BackendRef
impl<'de> Deserialize<'de> for BackendRef
Source§fn 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>,
Source§impl JsonSchema for BackendRef
impl JsonSchema for BackendRef
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more