add support for streaming requests. cleanup watcher initilisation

This commit is contained in:
Asim
2015-06-01 18:55:27 +01:00
parent fa2c27b64f
commit 09c784d294
25 changed files with 729 additions and 384 deletions

View File

@@ -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
}