Change cloud provider CreateTCPLoadBalancer to return endpoint as string

Some load balancers (particularly AWS ELB) define the public endpoint
as a hostname (instead of using IP addresses).

This is a partial fix for #5224; there will also be some proxy work.
This commit is contained in:
Justin Santa Barbara
2015-03-09 20:31:57 -07:00
parent a4d871a100
commit 5d36d3cdbe
6 changed files with 24 additions and 21 deletions

View File

@@ -47,8 +47,8 @@ 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
TCPLoadBalancerExists(name, region string) (bool, error)
// CreateTCPLoadBalancer creates a new tcp load balancer. Returns the IP address of the balancer
CreateTCPLoadBalancer(name, region string, externalIP net.IP, port int, hosts []string, affinityType api.AffinityType) (net.IP, error)
// CreateTCPLoadBalancer creates a new tcp load balancer. Returns the IP address or hostname of the balancer
CreateTCPLoadBalancer(name, region string, externalIP net.IP, port int, hosts []string, affinityType api.AffinityType) (string, error)
// UpdateTCPLoadBalancer updates hosts under the specified load balancer.
UpdateTCPLoadBalancer(name, region string, hosts []string) error
// DeleteTCPLoadBalancer deletes a specified load balancer.