#[non_exhaustive]pub struct RequestMirrorPolicy {
pub backend_service: Option<String>,
pub mirror_percent: Option<f64>,
/* private fields */
}region-url-maps or url-maps only.Expand description
A policy that specifies how requests intended for the route’s backends are shadowed to a separate mirrored backend service. The load balancer doesn’t wait for responses from the shadow service. Before sending traffic to the shadow service, the host or authority header is suffixed with-shadow.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.backend_service: Option<String>The full or partial URL to the BackendService resource being mirrored to.
The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map.
Serverless NEG backends are not currently supported as a mirrored backend service.
mirror_percent: Option<f64>The percentage of requests to be mirrored to backend_service.
Implementations§
Source§impl RequestMirrorPolicy
impl RequestMirrorPolicy
pub fn new() -> Self
Sourcepub fn set_backend_service<T>(self, v: T) -> Self
pub fn set_backend_service<T>(self, v: T) -> Self
Sets the value of backend_service.
§Example
let x = RequestMirrorPolicy::new().set_backend_service("example");Sourcepub fn set_or_clear_backend_service<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_backend_service<T>(self, v: Option<T>) -> Self
Sets or clears the value of backend_service.
§Example
let x = RequestMirrorPolicy::new().set_or_clear_backend_service(Some("example"));
let x = RequestMirrorPolicy::new().set_or_clear_backend_service(None::<String>);Sourcepub fn set_mirror_percent<T>(self, v: T) -> Self
pub fn set_mirror_percent<T>(self, v: T) -> Self
Sets the value of mirror_percent.
§Example
let x = RequestMirrorPolicy::new().set_mirror_percent(42.0);Sourcepub fn set_or_clear_mirror_percent<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_mirror_percent<T>(self, v: Option<T>) -> Self
Sets or clears the value of mirror_percent.
§Example
let x = RequestMirrorPolicy::new().set_or_clear_mirror_percent(Some(42.0));
let x = RequestMirrorPolicy::new().set_or_clear_mirror_percent(None::<f32>);Trait Implementations§
Source§impl Clone for RequestMirrorPolicy
impl Clone for RequestMirrorPolicy
Source§fn clone(&self) -> RequestMirrorPolicy
fn clone(&self) -> RequestMirrorPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more