#[non_exhaustive]pub struct BlueGreenSettings {
pub node_pool_soak_duration: Option<Duration>,
pub rollout_policy: Option<RolloutPolicy>,
/* private fields */
}Expand description
Settings for blue-green upgrade.
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.node_pool_soak_duration: Option<Duration>Time needed after draining entire blue pool. After this period, blue pool will be cleaned up.
rollout_policy: Option<RolloutPolicy>The rollout policy controls the general rollout progress of blue-green.
Implementations§
Source§impl BlueGreenSettings
impl BlueGreenSettings
pub fn new() -> Self
Sourcepub fn set_node_pool_soak_duration<T>(self, v: T) -> Self
pub fn set_node_pool_soak_duration<T>(self, v: T) -> Self
Sets the value of node_pool_soak_duration.
§Example
use wkt::Duration;
let x = BlueGreenSettings::new().set_node_pool_soak_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_node_pool_soak_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_node_pool_soak_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of node_pool_soak_duration.
§Example
use wkt::Duration;
let x = BlueGreenSettings::new().set_or_clear_node_pool_soak_duration(Some(Duration::default()/* use setters */));
let x = BlueGreenSettings::new().set_or_clear_node_pool_soak_duration(None::<Duration>);Sourcepub fn set_rollout_policy<T: Into<Option<RolloutPolicy>>>(self, v: T) -> Self
pub fn set_rollout_policy<T: Into<Option<RolloutPolicy>>>(self, v: T) -> Self
Sets the value of rollout_policy.
Note that all the setters affecting rollout_policy are mutually
exclusive.
§Example
use google_cloud_container_v1::model::blue_green_settings::StandardRolloutPolicy;
let x = BlueGreenSettings::new().set_rollout_policy(Some(
google_cloud_container_v1::model::blue_green_settings::RolloutPolicy::StandardRolloutPolicy(StandardRolloutPolicy::default().into())));Sourcepub fn standard_rollout_policy(&self) -> Option<&Box<StandardRolloutPolicy>>
pub fn standard_rollout_policy(&self) -> Option<&Box<StandardRolloutPolicy>>
The value of rollout_policy
if it holds a StandardRolloutPolicy, None if the field is not set or
holds a different branch.
Sourcepub fn set_standard_rollout_policy<T: Into<Box<StandardRolloutPolicy>>>(
self,
v: T,
) -> Self
pub fn set_standard_rollout_policy<T: Into<Box<StandardRolloutPolicy>>>( self, v: T, ) -> Self
Sets the value of rollout_policy
to hold a StandardRolloutPolicy.
Note that all the setters affecting rollout_policy are
mutually exclusive.
§Example
use google_cloud_container_v1::model::blue_green_settings::StandardRolloutPolicy;
let x = BlueGreenSettings::new().set_standard_rollout_policy(StandardRolloutPolicy::default()/* use setters */);
assert!(x.standard_rollout_policy().is_some());
assert!(x.autoscaled_rollout_policy().is_none());Sourcepub fn autoscaled_rollout_policy(&self) -> Option<&Box<AutoscaledRolloutPolicy>>
pub fn autoscaled_rollout_policy(&self) -> Option<&Box<AutoscaledRolloutPolicy>>
The value of rollout_policy
if it holds a AutoscaledRolloutPolicy, None if the field is not set or
holds a different branch.
Sourcepub fn set_autoscaled_rollout_policy<T: Into<Box<AutoscaledRolloutPolicy>>>(
self,
v: T,
) -> Self
pub fn set_autoscaled_rollout_policy<T: Into<Box<AutoscaledRolloutPolicy>>>( self, v: T, ) -> Self
Sets the value of rollout_policy
to hold a AutoscaledRolloutPolicy.
Note that all the setters affecting rollout_policy are
mutually exclusive.
§Example
use google_cloud_container_v1::model::blue_green_settings::AutoscaledRolloutPolicy;
let x = BlueGreenSettings::new().set_autoscaled_rollout_policy(AutoscaledRolloutPolicy::default()/* use setters */);
assert!(x.autoscaled_rollout_policy().is_some());
assert!(x.standard_rollout_policy().is_none());Trait Implementations§
Source§impl Clone for BlueGreenSettings
impl Clone for BlueGreenSettings
Source§fn clone(&self) -> BlueGreenSettings
fn clone(&self) -> BlueGreenSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more