Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRouteToHost = fmt.Errorf("no route to host")
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router interface { // UpdateNode updates the connection information for a node. UpdateNode(proto.IP, proto.RoutingConns) // RemoveNode removes the connection information for a node RemoveNode(proto.IP) // NextHop returns the next hop according to the routing policy. Note that the policy may be out of date with the // latest connection information, if new information has been received within the duration specified by updateWait. NextHop(proto.IP) (proto.IP, error) // SubscribeUpdates returns a channel which will be sent a routing policy whenever it is updated SubscribeUpdates() <-chan proto.RoutingPolicy // UnsubscribeUpdates unsubscribes a previously subscribed updates channel UnsubscribeUpdates(ch <-chan proto.RoutingPolicy) // Nodes returns a copy of the nodes and connections known to the router Nodes() proto.RoutingNodes }
Click to show internal directories.
Click to hide internal directories.