class Moonshot::Tools::ASGRolloutConfig

Attributes

instance_health_delay[RW]
pre_detach[R]
terminate[R]
terminate_when[R]
terminate_when_delay[RW]
terminate_when_timeout[R]

Public Class Methods

new() click to toggle source
# File lib/moonshot/tools/asg_rollout_config.rb, line 7
def initialize
  @instance_health_delay = 2
  @terminate_when_delay = 1
  @terminate_when_timeout = 300
  @terminate = proc do |h|
    h.ec2_instance.terminate
  end
end

Public Instance Methods

pre_detach=(value) click to toggle source
# File lib/moonshot/tools/asg_rollout_config.rb, line 16
def pre_detach=(value)
  raise ArgumentError, 'pre_detach must be callable' unless value.respond_to?(:call)

  @pre_detach = value
end
terminate=(value) click to toggle source
# File lib/moonshot/tools/asg_rollout_config.rb, line 32
def terminate=(value)
  raise ArgumentError, 'terminate must be callable' unless value.respond_to?(:call)

  @terminate = value
end
terminate_when=(value) click to toggle source
# File lib/moonshot/tools/asg_rollout_config.rb, line 22
def terminate_when=(value)
  raise ArgumentError, 'terminate_when must be callable' unless value.respond_to?(:call)

  @terminate_when = value
end
terminate_when_timeout=(value) click to toggle source
# File lib/moonshot/tools/asg_rollout_config.rb, line 28
def terminate_when_timeout=(value)
  @terminate_when_timeout = Float(value)
end