#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RequestMirrorPolicy
impl Debug for RequestMirrorPolicy
Source§impl Default for RequestMirrorPolicy
impl Default for RequestMirrorPolicy
Source§fn default() -> RequestMirrorPolicy
fn default() -> RequestMirrorPolicy
Source§impl Message for RequestMirrorPolicy
impl Message for RequestMirrorPolicy
Source§impl PartialEq for RequestMirrorPolicy
impl PartialEq for RequestMirrorPolicy
impl StructuralPartialEq for RequestMirrorPolicy
Auto Trait Implementations§
impl Freeze for RequestMirrorPolicy
impl RefUnwindSafe for RequestMirrorPolicy
impl Send for RequestMirrorPolicy
impl Sync for RequestMirrorPolicy
impl Unpin for RequestMirrorPolicy
impl UnsafeUnpin for RequestMirrorPolicy
impl UnwindSafe for RequestMirrorPolicy
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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