#[non_exhaustive]pub struct Canary {
pub runtime_config: Option<RuntimeConfig>,
pub mode: Option<Mode>,
/* private fields */
}Expand description
Canary represents the canary deployment strategy.
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.runtime_config: Option<RuntimeConfig>Optional. Runtime specific configurations for the deployment strategy. The runtime configuration is used to determine how Cloud Deploy will split traffic to enable a progressive deployment.
mode: Option<Mode>The mode to use for the canary deployment strategy.
Implementations§
Source§impl Canary
impl Canary
pub fn new() -> Self
Sourcepub fn set_runtime_config<T>(self, v: T) -> Selfwhere
T: Into<RuntimeConfig>,
pub fn set_runtime_config<T>(self, v: T) -> Selfwhere
T: Into<RuntimeConfig>,
Sets the value of runtime_config.
§Example
use google_cloud_deploy_v1::model::RuntimeConfig;
let x = Canary::new().set_runtime_config(RuntimeConfig::default()/* use setters */);Sourcepub fn set_or_clear_runtime_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RuntimeConfig>,
pub fn set_or_clear_runtime_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RuntimeConfig>,
Sets or clears the value of runtime_config.
§Example
use google_cloud_deploy_v1::model::RuntimeConfig;
let x = Canary::new().set_or_clear_runtime_config(Some(RuntimeConfig::default()/* use setters */));
let x = Canary::new().set_or_clear_runtime_config(None::<RuntimeConfig>);Sourcepub fn canary_deployment(&self) -> Option<&Box<CanaryDeployment>>
pub fn canary_deployment(&self) -> Option<&Box<CanaryDeployment>>
The value of mode
if it holds a CanaryDeployment, None if the field is not set or
holds a different branch.
Sourcepub fn set_canary_deployment<T: Into<Box<CanaryDeployment>>>(self, v: T) -> Self
pub fn set_canary_deployment<T: Into<Box<CanaryDeployment>>>(self, v: T) -> Self
Sets the value of mode
to hold a CanaryDeployment.
Note that all the setters affecting mode are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::CanaryDeployment;
let x = Canary::new().set_canary_deployment(CanaryDeployment::default()/* use setters */);
assert!(x.canary_deployment().is_some());
assert!(x.custom_canary_deployment().is_none());Sourcepub fn custom_canary_deployment(&self) -> Option<&Box<CustomCanaryDeployment>>
pub fn custom_canary_deployment(&self) -> Option<&Box<CustomCanaryDeployment>>
The value of mode
if it holds a CustomCanaryDeployment, None if the field is not set or
holds a different branch.
Sourcepub fn set_custom_canary_deployment<T: Into<Box<CustomCanaryDeployment>>>(
self,
v: T,
) -> Self
pub fn set_custom_canary_deployment<T: Into<Box<CustomCanaryDeployment>>>( self, v: T, ) -> Self
Sets the value of mode
to hold a CustomCanaryDeployment.
Note that all the setters affecting mode are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::CustomCanaryDeployment;
let x = Canary::new().set_custom_canary_deployment(CustomCanaryDeployment::default()/* use setters */);
assert!(x.custom_canary_deployment().is_some());
assert!(x.canary_deployment().is_none());