Add support for ECS Anywhere
This commit is contained in:
parent
fd95560c66
commit
b351266b2d
9 changed files with 138 additions and 11 deletions
|
@ -292,7 +292,7 @@ func (p *Provider) addServer(instance ecsInstance, loadBalancer *dynamic.Servers
|
|||
func (p *Provider) getIPPort(instance ecsInstance, serverPort string) (string, string, error) {
|
||||
var ip, port string
|
||||
|
||||
ip = p.getIPAddress(instance)
|
||||
ip = instance.machine.privateIP
|
||||
port = getPort(instance, serverPort)
|
||||
if len(ip) == 0 {
|
||||
return "", "", fmt.Errorf("unable to find the IP address for the instance %q: the server is ignored", instance.Name)
|
||||
|
@ -301,10 +301,6 @@ func (p *Provider) getIPPort(instance ecsInstance, serverPort string) (string, s
|
|||
return ip, port, nil
|
||||
}
|
||||
|
||||
func (p Provider) getIPAddress(instance ecsInstance) string {
|
||||
return instance.machine.privateIP
|
||||
}
|
||||
|
||||
func getPort(instance ecsInstance, serverPort string) string {
|
||||
if len(serverPort) > 0 {
|
||||
for _, port := range instance.machine.ports {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue