netevents

package
v2.4.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 0 Imported by: 8

Documentation

Index

Constants

View Source
const (

	// Event types
	// NetEvent_InterfaceStateDown is emitted when a network state has changed
	InterfaceStateDown = "interface-state-down"
	// InterfaceStateUp is emitted when a network state has changed
	InterfaceStateUp = "interface-state-up"

	// CloudReachable is emitted when the cloud (symphony) has become reachable
	CloudReachable = "cloud-reachable"
	// CloudUnreachable is emitted when the cloud (symphony) has become reachable
	CloudUnreachable = "cloud-unreachable"
	// NewAddress is emitted when an interface has a new address
	NewAddress = "new-address"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InterfaceEventData

type InterfaceEventData struct {
	// Id represents the interfaces, such as "eth0"
	ID string `json:"id"`
	// Index represents the interfaces 'index' value
	Index     int    `json:"index"`
	Address   string `json:"address"`
	AddressV6 string `json:"addressV6"`
	LinkState string `json:"linkstate"`
}

InterfaceEventData is used if the event involves a change to an interface

type NetEventData

type NetEventData struct {
	Type      string              `json:"type"`
	Interface *InterfaceEventData `json:"interface"`
}

NetEventData - All network events has this data struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL