Registry router fixes (#1961)

* only cache routes if told to do so

* Use roundrobin selector and retry in proxy

* Update lookup to require service

* Fix compile

* Fix compile

* Update

* Update

* rename query to lookup

* Update router.go

* Update
This commit is contained in:
Asim Aslam
2020-08-21 09:23:01 +01:00
committed by GitHub
parent 78a79ca9e1
commit f146b52418
18 changed files with 267 additions and 558 deletions

View File

@@ -23,7 +23,7 @@ type Router interface {
// The routing table
Table() Table
// Lookup queries routes in the routing table
Lookup(...QueryOption) ([]Route, error)
Lookup(service string, opts ...LookupOption) ([]Route, error)
// Watch returns a watcher which tracks updates to the routing table
Watch(opts ...WatchOption) (Watcher, error)
// Close the router
@@ -43,7 +43,7 @@ type Table interface {
// List all routes in the table
List() ([]Route, error)
// Query routes in the routing table
Query(...QueryOption) ([]Route, error)
Query(service string) ([]Route, error)
}
// Option used by the router