Documentation ¶
Overview ¶
Package keepalive implements tasks and handlers related IFID keepalives.
Handler ¶
Call NewHandler to create an IFID keepalive handler that implements infra.Handler. The handler validates the keepalive and activates the interface it was received on. In case the interface changed its state to active, the handler immediately pushes in IfStateInfo update to all border routers and starts beaconing on the activated interface.
Sender ¶
The sender periodically creates keepalive messages for all links.
Index ¶
Constants ¶
const ( // BeaconTimeout is the timeout for beaconing on an activated interface. BeaconTimeout = time.Second // IfStatePushTimeout is the timeout for pushing interface state info. IfStatePushTimeout = time.Second // DropRevTimeout is the timeout for dropping revocations. DropRevTimeout = time.Second )
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(ia addr.IA, intfs *ifstate.Interfaces, tasks StateChangeTasks) infra.Handler
NewHandler returns an infra.Handler for IFID keepalive messages. The state change tasks must all be set. Nil tasks will cause the handler to panic.
Types ¶
type IfStatePusher ¶
IfStatePusher is used to push interface state changes to the border routers when an interface changes its state to active.
type RevDropper ¶
type RevDropper interface {
DeleteRevocation(ctx context.Context, ia addr.IA, ifid common.IFIDType) error
}
RevDropper is used to drop revocations from the beacon store for interfaces that change their state to active.
type StateChangeTasks ¶
type StateChangeTasks struct { IfStatePusher IfStatePusher RevDropper RevDropper }
StateChangeTasks holds the tasks that are executed when the state of an interface changes to active.
Directories ¶
Path | Synopsis |
---|---|
Package mock_keepalive is a generated GoMock package.
|
Package mock_keepalive is a generated GoMock package. |