Service registered with same id on Consul Catalog
This commit is contained in:
parent
772b260b37
commit
a99673122e
5 changed files with 224 additions and 29 deletions
|
@ -24,6 +24,7 @@ var _ provider.Provider = (*Provider)(nil)
|
|||
|
||||
type itemData struct {
|
||||
ID string
|
||||
Node string
|
||||
Name string
|
||||
Address string
|
||||
Port string
|
||||
|
@ -164,6 +165,7 @@ func (p *Provider) getConsulServicesData(ctx context.Context) ([]itemData, error
|
|||
|
||||
item := itemData{
|
||||
ID: consulService.ServiceID,
|
||||
Node: consulService.Node,
|
||||
Name: consulService.ServiceName,
|
||||
Address: address,
|
||||
Port: strconv.Itoa(consulService.ServicePort),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue