register fix
This commit is contained in:
parent
0b035dfcc9
commit
ceaeecf1b4
@ -5,6 +5,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
consul "github.com/hashicorp/consul/api"
|
||||
@ -58,7 +59,7 @@ func (s *Service) GetFullAddr() string {
|
||||
func (s *Service) Register() error {
|
||||
def := &consul.AgentServiceRegistration{
|
||||
ID: s.GetID(),
|
||||
Name: s.Name,
|
||||
Name: strings.Replace(s.Name, "-", "_", -1),
|
||||
Address: s.IP,
|
||||
Port: s.Port,
|
||||
Tags: s.getTags(),
|
||||
|
Loading…
Reference in New Issue
Block a user