class Rack::Healthcheck::Actions::LoadBalancer

Constants

DEAD
LIVE
VALID_REQUEST_METHODS

Attributes

status[RW]

Public Instance Methods

delete() click to toggle source

Change current status to DEAD This method is used to remove the machine from pool

# File lib/rack/healthcheck/actions/load_balancer.rb, line 32
def delete
  self.class.status = DEAD
  response
end
get() click to toggle source

Returns the current status to load balancer When status is LIVE the load balancer keeps the machine in pool When status is DEAD the load balancer removes the machine from pool

# File lib/rack/healthcheck/actions/load_balancer.rb, line 19
def get
  response
end
post() click to toggle source

Change current status to LIVE This method is used to add the machine in pool

# File lib/rack/healthcheck/actions/load_balancer.rb, line 25
def post
  self.class.status = LIVE
  response
end

Private Instance Methods

response() click to toggle source
# File lib/rack/healthcheck/actions/load_balancer.rb, line 39
def response
  ["200", { "Content-Type" => "text/plain" }, [self.class.status]]
end