Simplified table logic. Lookup tests. mucp/cient update

This commit is contained in:
Milos Gajdos
2019-07-08 21:03:54 +01:00
parent cc590f5f2c
commit b82245429e
9 changed files with 183 additions and 194 deletions

View File

@@ -20,12 +20,12 @@ type Router interface {
Options() Options
// ID returns the ID of the router
ID() string
// Table returns the routing table
Table() table.Table
// Address returns the router adddress
Address() string
// Network returns the network address of the router
Network() string
// Table returns the routing table
Table() table.Table
// Advertise advertises routes to the network
Advertise() (<-chan *Advert, error)
// Update updates the routing table
@@ -69,6 +69,9 @@ type Advert struct {
ID string
// Timestamp marks the time when the update is sent
Timestamp time.Time
// TTL is Advert TTL
// TODO: not used
TTL time.Time
// Events is a list of routing table events to advertise
Events []*table.Event
}