Big refactor. New Registry watchers. New options. New names.
This commit is contained in:
@@ -3,26 +3,22 @@ package router
|
||||
|
||||
// Router is micro network router
|
||||
type Router interface {
|
||||
// Initi initializes Router with options
|
||||
// Init initializes the router with options
|
||||
Init(...Option) error
|
||||
// Options returns Router options
|
||||
// Options returns the router options
|
||||
Options() Options
|
||||
// Table returns routing table
|
||||
Table() Table
|
||||
// Address returns router adddress
|
||||
Address() string
|
||||
// Gossip returns router gossip address
|
||||
Gossip() string
|
||||
// Network returns router network address
|
||||
Network() string
|
||||
// Start starts router
|
||||
// Start starts the router
|
||||
Start() error
|
||||
// Stop stops router
|
||||
// Stop stops the router
|
||||
Stop() error
|
||||
// String returns router debug info
|
||||
String() string
|
||||
}
|
||||
|
||||
// RIB is Routing Information Base
|
||||
type RIB interface {
|
||||
// String returns debug info
|
||||
String() string
|
||||
}
|
||||
@@ -30,6 +26,9 @@ type RIB interface {
|
||||
// Option used by the router
|
||||
type Option func(*Options)
|
||||
|
||||
// RIBOptopn is used to configure RIB
|
||||
type RIBOption func(*RIBOptions)
|
||||
|
||||
// RouteOption is used to define routing table entry options
|
||||
type RouteOption func(*RouteOptions)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user