Update router querying method (#834)

* Add address to router query options. Drop Query interface for QueryOptions

* Cleanup isMatch function

* Update network proto
This commit is contained in:
Asim Aslam
2019-10-09 17:13:52 +01:00
committed by GitHub
parent 107b7419b7
commit fe94237448
15 changed files with 249 additions and 122 deletions

View File

@@ -31,7 +31,7 @@ type Router interface {
// Solicit advertises the whole routing table to the network
Solicit() error
// Lookup queries routes in the routing table
Lookup(Query) ([]Route, error)
Lookup(...QueryOption) ([]Route, error)
// Watch returns a watcher which tracks updates to the routing table
Watch(opts ...WatchOption) (Watcher, error)
// Start starts the router
@@ -55,7 +55,7 @@ type Table interface {
// List all routes in the table
List() ([]Route, error)
// Query routes in the routing table
Query(Query) ([]Route, error)
Query(...QueryOption) ([]Route, error)
}
// Option used by the router