Router table.Read replaces List/Query (#1966)

* Table.REad insted of list and query

* fmt
This commit is contained in:
Asim Aslam
2020-08-23 13:10:48 +01:00
committed by Vasiliy Tolstov
parent 1d61a1788f
commit 900e782c4b
3 changed files with 25 additions and 25 deletions

View File

@@ -266,7 +266,7 @@ func (r *rtr) Lookup(service string, opts ...router.LookupOption) ([]router.Rout
q := router.NewLookup(opts...)
// if we find the routes filter and return them
routes, err := r.table.Query(service)
routes, err := r.table.Read(router.ReadService(service))
if err == nil {
routes = router.Filter(routes, q)
if len(routes) == 0 {