Consul update
This commit is contained in:
parent
7bd8f754d8
commit
ebef6e138d
@ -2,7 +2,6 @@ package consul
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
@ -46,7 +45,6 @@ func NewService(servAddr, id, name, useDomainOverIp, addr, domain, pathPrefix st
|
|||||||
if useDomainOverIp == "true" { // FIXME types...
|
if useDomainOverIp == "true" { // FIXME types...
|
||||||
s.Address = domain
|
s.Address = domain
|
||||||
}
|
}
|
||||||
log.Printf("Init consul with server addr: %s", s.Address)
|
|
||||||
|
|
||||||
client, err := consul.NewClient(newClientConfig(servAddr))
|
client, err := consul.NewClient(newClientConfig(servAddr))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -62,7 +60,6 @@ func NewService(servAddr, id, name, useDomainOverIp, addr, domain, pathPrefix st
|
|||||||
|
|
||||||
func newClientConfig(serverAddr string) *consul.Config {
|
func newClientConfig(serverAddr string) *consul.Config {
|
||||||
conf := consul.DefaultConfig()
|
conf := consul.DefaultConfig()
|
||||||
log.Printf("Setting consul server addr: %s", serverAddr)
|
|
||||||
conf.Address = serverAddr
|
conf.Address = serverAddr
|
||||||
|
|
||||||
return conf
|
return conf
|
||||||
|
Loading…
Reference in New Issue
Block a user