Class: EcsDeploy::AutoScaler::SimpleScalingConfig
- Inherits:
-
Struct
- Object
- Struct
- EcsDeploy::AutoScaler::SimpleScalingConfig
- Includes:
- ConfigBase
- Defined in:
- lib/ecs_deploy/auto_scaler/simple_scaling_config.rb
Instance Attribute Summary collapse
-
#cluster ⇒ Object
Returns the value of attribute cluster.
-
#name ⇒ Object
Returns the value of attribute name.
-
#region ⇒ Object
Returns the value of attribute region.
-
#service_configs ⇒ Object
Returns the value of attribute service_configs.
Instance Method Summary collapse
- #cluster_resource_manager ⇒ Object
-
#initialize(attributes = {}, logger) ⇒ SimpleScalingConfig
constructor
A new instance of SimpleScalingConfig.
- #update_desired_capacity(required_capacity) ⇒ Object
Methods included from ConfigBase
Constructor Details
#initialize(attributes = {}, logger) ⇒ SimpleScalingConfig
Returns a new instance of SimpleScalingConfig.
9 10 11 12 13 14 15 16 |
# File 'lib/ecs_deploy/auto_scaler/simple_scaling_config.rb', line 9 def initialize(attributes = {}, logger) attributes = attributes.dup services = attributes.delete("services") super(attributes, logger) self.service_configs = services.map do |s| ServiceConfig.new(s.merge("cluster" => cluster, "region" => region), logger) end end |
Instance Attribute Details
#cluster ⇒ Object
Returns the value of attribute cluster
6 7 8 |
# File 'lib/ecs_deploy/auto_scaler/simple_scaling_config.rb', line 6 def cluster @cluster end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/ecs_deploy/auto_scaler/simple_scaling_config.rb', line 6 def name @name end |
#region ⇒ Object
Returns the value of attribute region
6 7 8 |
# File 'lib/ecs_deploy/auto_scaler/simple_scaling_config.rb', line 6 def region @region end |
#service_configs ⇒ Object
Returns the value of attribute service_configs
6 7 8 |
# File 'lib/ecs_deploy/auto_scaler/simple_scaling_config.rb', line 6 def service_configs @service_configs end |
Instance Method Details
#cluster_resource_manager ⇒ Object
22 23 24 |
# File 'lib/ecs_deploy/auto_scaler/simple_scaling_config.rb', line 22 def cluster_resource_manager @cluster_resource_manager ||= NullClusterResourceManager.new end |
#update_desired_capacity(required_capacity) ⇒ Object
18 19 20 |
# File 'lib/ecs_deploy/auto_scaler/simple_scaling_config.rb', line 18 def update_desired_capacity(required_capacity) @logger.debug "#{log_prefix} Skipping infrastructure scaling (managed by capacity provider)" end |