1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-18 22:17:44 +02:00

Changed default router table modifications. Entry is now Route.

This commit is contained in:
Milos Gajdos
2019-06-10 13:34:23 +01:00
parent 459f4c8387
commit da18ea4ab5
5 changed files with 95 additions and 96 deletions

View File

@ -8,13 +8,13 @@ type Router interface {
// Options returns Router options
Options() Options
// Add adds new entry into routing table
Add(Entry) error
Add(Route) error
// Remove removes entry from the routing table
Remove(Entry) error
Remove(Route) error
// Update updates entry in the routing table
Update(...EntryOption) error
Update(...RouteOption) error
// Lookup queries the routing table and returns matching entries
Lookup(Query) ([]*Entry, error)
Lookup(Query) ([]*Route, error)
// Table returns routing table
Table() Table
// Address returns the router bind adddress
@ -34,8 +34,8 @@ type RIB interface {
// Option used by the router
type Option func(*Options)
// EntryOption is used to define routing entry options
type EntryOption func(*EntryOptions)
// RouteOption is used to define routing table entry options
type RouteOption func(*RouteOptions)
// QueryOption is used to define query options
type QueryOption func(*QueryOptions)