Compare commits

...

1 Commits

Author SHA1 Message Date
566cbbd31b Consul refactor 2023-06-29 14:34:25 +02:00

View File

@@ -21,7 +21,7 @@ type Service struct {
ttl time.Duration
client *consul.Client
agent *consul.Agent
connect *consul.Connect
connect *connect.Service
kv *consul.KV
}
@@ -107,7 +107,10 @@ func (s *Service) Unregister() error {
}
func (s *Service) Connect() (*connect.Service, error) {
return connect.NewService(s.Name, s.client)
svc, err := connect.NewService(s.Name, s.client)
s.connect = svc
return svc, err
}
func (s *Service) KV() *consul.KV {