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

@@ -54,7 +54,6 @@ func newConsulRegistry(addrs []string, opts ...Option) Registry {
services: make(map[string]*Service),
}
cr.Watch()
return cr
}
@@ -156,6 +155,6 @@ func (c *consulRegistry) ListServices() ([]*Service, error) {
return services, nil
}
func (c *consulRegistry) Watch() {
newConsulWatcher(c)
func (c *consulRegistry) Watch() (Watcher, error) {
return newConsulWatcher(c)
}