github.com/armon/consul-api was deprecated, use official api
This commit is contained in:
parent
1f0f393d32
commit
0e73a84857
@ -3,7 +3,7 @@ package registry
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
consul "github.com/armon/consul-api"
|
consul "github.com/hashicorp/consul/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ConsulRegistry struct {
|
type ConsulRegistry struct {
|
||||||
@ -100,7 +100,7 @@ func (c *ConsulRegistry) NewNode(id, address string, port int) Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewConsulRegistry() Registry {
|
func NewConsulRegistry() Registry {
|
||||||
client, _ := consul.NewClient(&consul.Config{})
|
client, _ := consul.NewClient(consul.DefaultConfig())
|
||||||
|
|
||||||
return &ConsulRegistry{
|
return &ConsulRegistry{
|
||||||
Client: client,
|
Client: client,
|
||||||
|
Loading…
Reference in New Issue
Block a user