#[non_exhaustive]pub struct AutomaticScaling {Show 13 fields
pub cool_down_period: Option<Duration>,
pub cpu_utilization: Option<CpuUtilization>,
pub max_concurrent_requests: i32,
pub max_idle_instances: i32,
pub max_total_instances: i32,
pub max_pending_latency: Option<Duration>,
pub min_idle_instances: i32,
pub min_total_instances: i32,
pub min_pending_latency: Option<Duration>,
pub request_utilization: Option<RequestUtilization>,
pub disk_utilization: Option<DiskUtilization>,
pub network_utilization: Option<NetworkUtilization>,
pub standard_scheduler_settings: Option<StandardSchedulerSettings>,
/* private fields */
}Expand description
Automatic scaling is based on request rate, response latencies, and other application metrics.
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.cool_down_period: Option<Duration>The time period that the Autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. Only applicable in the App Engine flexible environment.
cpu_utilization: Option<CpuUtilization>Target scaling by CPU usage.
max_concurrent_requests: i32Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.
Defaults to a runtime-specific value.
max_idle_instances: i32Maximum number of idle instances that should be maintained for this version.
max_total_instances: i32Maximum number of instances that should be started to handle requests for this version.
max_pending_latency: Option<Duration>Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.
min_idle_instances: i32Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.
min_total_instances: i32Minimum number of running instances that should be maintained for this version.
min_pending_latency: Option<Duration>Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.
request_utilization: Option<RequestUtilization>Target scaling by request utilization.
disk_utilization: Option<DiskUtilization>Target scaling by disk usage.
network_utilization: Option<NetworkUtilization>Target scaling by network usage.
standard_scheduler_settings: Option<StandardSchedulerSettings>Scheduler settings for standard environment.
Implementations§
Source§impl AutomaticScaling
impl AutomaticScaling
pub fn new() -> Self
Sourcepub fn set_cool_down_period<T>(self, v: T) -> Self
pub fn set_cool_down_period<T>(self, v: T) -> Self
Sets the value of cool_down_period.
Sourcepub fn set_or_clear_cool_down_period<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cool_down_period<T>(self, v: Option<T>) -> Self
Sets or clears the value of cool_down_period.
Sourcepub fn set_cpu_utilization<T>(self, v: T) -> Selfwhere
T: Into<CpuUtilization>,
pub fn set_cpu_utilization<T>(self, v: T) -> Selfwhere
T: Into<CpuUtilization>,
Sets the value of cpu_utilization.
Sourcepub fn set_or_clear_cpu_utilization<T>(self, v: Option<T>) -> Selfwhere
T: Into<CpuUtilization>,
pub fn set_or_clear_cpu_utilization<T>(self, v: Option<T>) -> Selfwhere
T: Into<CpuUtilization>,
Sets or clears the value of cpu_utilization.
Sourcepub fn set_max_concurrent_requests<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_concurrent_requests<T: Into<i32>>(self, v: T) -> Self
Sets the value of max_concurrent_requests.
Sourcepub fn set_max_idle_instances<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_idle_instances<T: Into<i32>>(self, v: T) -> Self
Sets the value of max_idle_instances.
Sourcepub fn set_max_total_instances<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_total_instances<T: Into<i32>>(self, v: T) -> Self
Sets the value of max_total_instances.
Sourcepub fn set_max_pending_latency<T>(self, v: T) -> Self
pub fn set_max_pending_latency<T>(self, v: T) -> Self
Sets the value of max_pending_latency.
Sourcepub fn set_or_clear_max_pending_latency<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_max_pending_latency<T>(self, v: Option<T>) -> Self
Sets or clears the value of max_pending_latency.
Sourcepub fn set_min_idle_instances<T: Into<i32>>(self, v: T) -> Self
pub fn set_min_idle_instances<T: Into<i32>>(self, v: T) -> Self
Sets the value of min_idle_instances.
Sourcepub fn set_min_total_instances<T: Into<i32>>(self, v: T) -> Self
pub fn set_min_total_instances<T: Into<i32>>(self, v: T) -> Self
Sets the value of min_total_instances.
Sourcepub fn set_min_pending_latency<T>(self, v: T) -> Self
pub fn set_min_pending_latency<T>(self, v: T) -> Self
Sets the value of min_pending_latency.
Sourcepub fn set_or_clear_min_pending_latency<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_min_pending_latency<T>(self, v: Option<T>) -> Self
Sets or clears the value of min_pending_latency.
Sourcepub fn set_request_utilization<T>(self, v: T) -> Selfwhere
T: Into<RequestUtilization>,
pub fn set_request_utilization<T>(self, v: T) -> Selfwhere
T: Into<RequestUtilization>,
Sets the value of request_utilization.
Sourcepub fn set_or_clear_request_utilization<T>(self, v: Option<T>) -> Selfwhere
T: Into<RequestUtilization>,
pub fn set_or_clear_request_utilization<T>(self, v: Option<T>) -> Selfwhere
T: Into<RequestUtilization>,
Sets or clears the value of request_utilization.
Sourcepub fn set_disk_utilization<T>(self, v: T) -> Selfwhere
T: Into<DiskUtilization>,
pub fn set_disk_utilization<T>(self, v: T) -> Selfwhere
T: Into<DiskUtilization>,
Sets the value of disk_utilization.
Sourcepub fn set_or_clear_disk_utilization<T>(self, v: Option<T>) -> Selfwhere
T: Into<DiskUtilization>,
pub fn set_or_clear_disk_utilization<T>(self, v: Option<T>) -> Selfwhere
T: Into<DiskUtilization>,
Sets or clears the value of disk_utilization.
Sourcepub fn set_network_utilization<T>(self, v: T) -> Selfwhere
T: Into<NetworkUtilization>,
pub fn set_network_utilization<T>(self, v: T) -> Selfwhere
T: Into<NetworkUtilization>,
Sets the value of network_utilization.
Sourcepub fn set_or_clear_network_utilization<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkUtilization>,
pub fn set_or_clear_network_utilization<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkUtilization>,
Sets or clears the value of network_utilization.
Sourcepub fn set_standard_scheduler_settings<T>(self, v: T) -> Selfwhere
T: Into<StandardSchedulerSettings>,
pub fn set_standard_scheduler_settings<T>(self, v: T) -> Selfwhere
T: Into<StandardSchedulerSettings>,
Sets the value of standard_scheduler_settings.
Sourcepub fn set_or_clear_standard_scheduler_settings<T>(self, v: Option<T>) -> Selfwhere
T: Into<StandardSchedulerSettings>,
pub fn set_or_clear_standard_scheduler_settings<T>(self, v: Option<T>) -> Selfwhere
T: Into<StandardSchedulerSettings>,
Sets or clears the value of standard_scheduler_settings.
Trait Implementations§
Source§impl Clone for AutomaticScaling
impl Clone for AutomaticScaling
Source§fn clone(&self) -> AutomaticScaling
fn clone(&self) -> AutomaticScaling
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more