Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 48a7e968d1 | |||
| 6c46a0e6a4 | |||
| ceaeecf1b4 |
@@ -5,6 +5,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
consul "github.com/hashicorp/consul/api"
|
consul "github.com/hashicorp/consul/api"
|
||||||
@@ -25,7 +26,7 @@ var ErrServiceUnavailable = fmt.Errorf("Service is unavailable")
|
|||||||
func NewService(serverAddr, appID, appName, ip, domain string, appPort int) (*Service, error) {
|
func NewService(serverAddr, appID, appName, ip, domain string, appPort int) (*Service, error) {
|
||||||
s := new(Service)
|
s := new(Service)
|
||||||
s.AppID = appID
|
s.AppID = appID
|
||||||
s.Name = appName
|
s.Name = strings.Replace(appName, "-", "", -1)
|
||||||
s.Address = domain
|
s.Address = domain
|
||||||
s.IP = ip
|
s.IP = ip
|
||||||
s.Port = appPort
|
s.Port = appPort
|
||||||
|
|||||||
Reference in New Issue
Block a user