1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # ElasticScalingConfig - Trait Implementations
//!
//! This module contains trait implementations for `ElasticScalingConfig`.
//!
//! ## Implemented Traits
//!
//! - `Default`
//!
//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
use super::types::{CloudProvider, ElasticScalingConfig, InstanceType};
impl Default for ElasticScalingConfig {
fn default() -> Self {
Self {
min_nodes: 3,
max_nodes: 100,
target_cpu_utilization: 0.70,
target_memory_utilization: 0.75,
scale_up_threshold: 0.80,
scale_down_threshold: 0.30,
cooldown_seconds: 300,
use_spot_instances: true,
max_spot_ratio: 0.50,
instance_types: vec![
InstanceType {
name: "small".to_string(),
vcpus: 2,
memory_gb: 4,
hourly_cost: 0.05,
spot_hourly_cost: 0.015,
},
InstanceType {
name: "medium".to_string(),
vcpus: 4,
memory_gb: 8,
hourly_cost: 0.10,
spot_hourly_cost: 0.03,
},
InstanceType {
name: "large".to_string(),
vcpus: 8,
memory_gb: 16,
hourly_cost: 0.20,
spot_hourly_cost: 0.06,
},
],
provider: CloudProvider::AWS,
}
}
}