Add Solicit method to router interface

When calling Solicit, router lists all the routes and advertise them
straight away
This commit is contained in:
Milos Gajdos
2019-09-05 13:23:33 +01:00
parent a1ba1482c5
commit 9161b20d6b
2 changed files with 42 additions and 14 deletions

View File

@@ -28,6 +28,8 @@ type Router interface {
Advertise() (<-chan *Advert, error)
// Process processes incoming adverts
Process(*Advert) error
// Solicit advertises the whole routing table ot the network
Solicit() error
// Lookup queries routes in the routing table
Lookup(Query) ([]Route, error)
// Watch returns a watcher which tracks updates to the routing table