Documentation ¶
Index ¶
- func AddEventListener(listenerName string, cbs EventCallbacks)
- func NetworkChanged(params NetworkChangedParams)
- func PollReqHdlr()
- func RemoteHealthChanged(params RemoteHealthChangedParams)
- func RemoveEventListener(listenerName string)
- type EventCallbacks
- type NetworkChangedCb
- type NetworkChangedParams
- type RemoteHealthChangedCb
- type RemoteHealthChangedParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEventListener ¶
func AddEventListener(listenerName string, cbs EventCallbacks)
func NetworkChanged ¶
func NetworkChanged(params NetworkChangedParams)
func PollReqHdlr ¶
func PollReqHdlr()
func RemoteHealthChanged ¶
func RemoteHealthChanged(params RemoteHealthChangedParams)
func RemoveEventListener ¶
func RemoveEventListener(listenerName string)
Types ¶
type EventCallbacks ¶
type EventCallbacks struct { // NetworkChanged is called when a remote network was added or removed from the configuration. NetworkChanged NetworkChangedCb // RemoteHealthChanged is called when the reachability status of a remote AS changed. RemoteHealthChanged RemoteHealthChangedCb }
EventCallbacks can be used by a listener to register for certain events by setting the corresponding function pointer in the struct. Note, that the callback MUST NOT BLOCK. Long running or potentially blocking operations should be executed in a separate go-routine.
type NetworkChangedCb ¶
type NetworkChangedCb func(NetworkChangedParams)
type NetworkChangedParams ¶
type NetworkChangedParams struct { // RemoteIA is the remote IA for which network information changed. RemoteIA addr.IA // IpNet contains the network prefix that was added/removed. IpNet net.IPNet // Healthy is true if the remote IA can be reached. Healthy bool // Added is true if the prefix was added, false otherwise. Added bool }
NetworkChangedParams contains the parameters that are passed along with a NetworkChanged event.
type RemoteHealthChangedCb ¶
type RemoteHealthChangedCb func(RemoteHealthChangedParams)
type RemoteHealthChangedParams ¶
type RemoteHealthChangedParams struct { // RemoteIA is the IA for which the reachability status changed. RemoteIA addr.IA // Nets contains all network prefixes the remote IA announced. Nets []*net.IPNet // Healthy is true if the remote IA is reachable, false otherwise. Healthy bool }
RemoteHealthChangedParams contains the parameters that are passed along with a RemoteHealthChanged event.
Click to show internal directories.
Click to hide internal directories.