class Fastly::Director

A logical collection of backends - for example all the asset servers in one data center

Attributes

capacity[RW]
comment[RW]

a free form comment field

name[RW]

The domain name of this domain

quorum[RW]

the percentage of capacity that needs to be up for a director to be considered up (default 75)

retries[RW]

how many backends to search if it fails (default 5)

service[RW]

The id of the service this belongs to.

service_id[RW]
type[RW]

what kind of Load Balancer group (currently always 1 meaning random)

version[RW]

The number of the version this belongs to.

Public Instance Methods

add_backend(backend) click to toggle source

Add a Backend object to a Director

Return true on success and false on failure

# File lib/fastly/director.rb, line 50
def add_backend(backend)
  hash = fetcher.client.post("#{Director.put_path(self)}/backend/#{backend.name}")
  !hash.nil?
end
delete_backend(backend) click to toggle source

Delete a Backend object from a Director

Return true on success and false on failure

# File lib/fastly/director.rb, line 58
def delete_backend(backend)
  hash = fetcher.client.delete("#{Director.put_path(self)}/backend/#{backend.name}")
  !hash.nil?
end