Don't hard code load balancer zone.

This commit is contained in:
Brendan Burns
2014-07-28 15:42:08 -07:00
parent 1d4ed339c9
commit c717b872a3
5 changed files with 43 additions and 8 deletions

View File

@@ -26,6 +26,8 @@ type Interface interface {
TCPLoadBalancer() (TCPLoadBalancer, bool)
// Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
Instances() (Instances, bool)
// Zones returns a zones interface. Also returns true if the interface is supported, false otherwise.
Zones() (Zones, bool)
}
// TCPLoadBalancer is an abstract, pluggable interface for TCP load balancers.
@@ -48,3 +50,9 @@ type Instances interface {
// List lists instances that match 'filter' which is a regular expression which must match the entire instance name (fqdn)
List(filter string) ([]string, error)
}
// Zones is an abstract, pluggable interface for zone enumeration.
type Zones interface {
// GetZone returns the name of the current failure zone that the program is running in
GetZone() (string, error)
}