Merge pull request #7669 from a-robinson/lb

Change the cloud provider TCPLoadBalancerExists function to GetTCPLoadBalancer...
This commit is contained in:
Quinton Hoole
2015-05-05 11:42:06 -07:00
6 changed files with 36 additions and 35 deletions

View File

@@ -58,11 +58,10 @@ func GetLoadBalancerName(service *api.Service) string {
// TCPLoadBalancer is an abstract, pluggable interface for TCP load balancers.
type TCPLoadBalancer interface {
// TCPLoadBalancerExists returns whether the specified load balancer exists.
// TODO: Break this up into different interfaces (LB, etc) when we have more than one type of service
// TODO: This should really return the details of the load balancer so we can
// determine if it matches the needs of a service rather than if it exists.
TCPLoadBalancerExists(name, region string) (bool, error)
// GetTCPLoadBalancer returns whether the specified load balancer exists, and
// if so, what its IP address or hostname is.
GetTCPLoadBalancer(name, region string) (endpoint string, exists bool, err error)
// CreateTCPLoadBalancer creates a new tcp load balancer. Returns the IP address or hostname of the balancer
CreateTCPLoadBalancer(name, region string, externalIP net.IP, ports []int, hosts []string, affinityType api.AffinityType) (string, error)
// UpdateTCPLoadBalancer updates hosts under the specified load balancer.