class Kelbim::DSL::EC2::LoadBalancer::HealthCheck

Public Class Methods

new(context, load_balancer, &block) click to toggle source
# File lib/kelbim/dsl/health-check.rb, line 9
def initialize(context, load_balancer, &block)
  @error_identifier = "LoadBalancer `#{load_balancer}`"
  @context = context.dup
  @result = {}
  instance_eval(&block)
end

Public Instance Methods

healthy_threshold(value) click to toggle source
# File lib/kelbim/dsl/health-check.rb, line 41
def healthy_threshold(value)
  call_once(:healthy_threshold)
  expected_type(value, Integer)
  @result[:healthy_threshold] = value
end
interval(value) click to toggle source
# File lib/kelbim/dsl/health-check.rb, line 35
def interval(value)
  call_once(:interval)
  expected_type(value, Integer)
  @result[:interval] = value
end
result() click to toggle source
# File lib/kelbim/dsl/health-check.rb, line 16
def result
  [:target, :timeout, :interval, :healthy_threshold, :unhealthy_threshold].each do |name|
    required(name, @result[name])
  end

  @result
end
target(value) click to toggle source
# File lib/kelbim/dsl/health-check.rb, line 24
def target(value)
  call_once(:target)
  @result[:target] = value
end
timeout(value) click to toggle source
# File lib/kelbim/dsl/health-check.rb, line 29
def timeout(value)
  call_once(:timeout)
  expected_type(value, Integer)
  @result[:timeout] = value
end
unhealthy_threshold(value) click to toggle source
# File lib/kelbim/dsl/health-check.rb, line 47
def unhealthy_threshold(value)
  call_once(:unhealthy_threshold)
  expected_type(value, Integer)
  @result[:unhealthy_threshold] = value
end