add support for streaming requests. cleanup watcher initilisation
This commit is contained in:
@@ -147,8 +147,9 @@ func (e *etcdRegistry) ListServices() ([]*registry.Service, error) {
|
||||
return services, nil
|
||||
}
|
||||
|
||||
func (e *etcdRegistry) Watch() {
|
||||
newEtcdWatcher(e)
|
||||
func (e *etcdRegistry) Watch() (registry.Watcher, error) {
|
||||
// todo: fix watcher
|
||||
return newEtcdWatcher(e)
|
||||
}
|
||||
|
||||
func NewRegistry(addrs []string, opt ...registry.Option) registry.Registry {
|
||||
@@ -170,8 +171,5 @@ func NewRegistry(addrs []string, opt ...registry.Option) registry.Registry {
|
||||
services: make(map[string]*registry.Service),
|
||||
}
|
||||
|
||||
// Need to fix watcher
|
||||
// e.Watch()
|
||||
|
||||
return e
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user