data

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: AGPL-3.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BabelLink struct {
	// How need this:
	RXCost       int `json:"rxcost"`
	TXCost       int `json:"txcost"`
	Cost         int `json:"cost"`
	Reachability int `json:"reachability"`
}

BabelLink struct

type BabelNeighbours

type BabelNeighbours struct {
	Protocol         string               `json:"protocol"`
	LinkLocalAddress string               `json:"ll-addr"`
	Neighbours       map[string]BabelLink `json:"neighbours"`
}

BabelNeighbours struct

type BatadvNeighbours

type BatadvNeighbours struct {
	Neighbours map[string]BatmanLink `json:"neighbours"`
}

BatadvNeighbours struct

type BatmanLink struct {
	Lastseen float64 `json:"lastseen"`
	Tq       int     `json:"tq"`
}

BatmanLink struct

type Clients

type Clients struct {
	Wifi   uint32 `json:"wifi"`
	Wifi24 uint32 `json:"wifi24"`
	Wifi5  uint32 `json:"wifi5"`
	Total  uint32 `json:"total"`
}

Clients struct

type Hardware

type Hardware struct {
	Nproc int    `json:"nproc"`
	Model string `json:"model,omitempty"`
}

Hardware struct

type LLDPLink struct {
	Name        string `json:"name"`
	Description string `json:"descr"`
}

LLDPLink struct

type LLDPNeighbours

type LLDPNeighbours map[string]LLDPLink

LLDPNeighbours struct

type Location

type Location struct {
	Longitude float64 `json:"longitude,omitempty"`
	Latitude  float64 `json:"latitude,omitempty"`
	Altitude  float64 `json:"altitude,omitempty"`
}

Location struct

type Memory

type Memory struct {
	Cached  int64 `json:"cached"`
	Total   int64 `json:"total"`
	Buffers int64 `json:"buffers"`
	Free    int64 `json:"free"`
}

Memory struct

type MeshVPN

type MeshVPN struct {
	Groups map[string]*MeshVPNPeerGroup `json:"groups,omitempty"`
}

MeshVPN struct

type MeshVPNPeerGroup

type MeshVPNPeerGroup struct {
	Peers  map[string]*MeshVPNPeerLink  `json:"peers"`
	Groups map[string]*MeshVPNPeerGroup `json:"groups"`
}

MeshVPNPeerGroup struct

type MeshVPNPeerLink struct {
	Established float64 `json:"established"`
}

MeshVPNPeerLink struct

type Neighbours

type Neighbours struct {
	Batadv map[string]BatadvNeighbours `json:"batadv"`
	Babel  map[string]BabelNeighbours  `json:"babel"`
	LLDP   map[string]LLDPNeighbours   `json:"lldp"`
	//WifiNeighbours map[string]WifiNeighbours   `json:"wifi"`
	NodeID string `json:"node_id"`
}

Neighbours struct

type Network

type Network struct {
	Mac       string                       `json:"mac"`
	Addresses []string                     `json:"addresses"`
	Mesh      map[string]*NetworkInterface `json:"mesh"`
	// still used in gluon?
	MeshInterfaces []string `json:"mesh_interfaces"`
}

Network struct

type NetworkInterface

type NetworkInterface struct {
	Interfaces struct {
		Wireless []string `json:"wireless,omitempty"`
		Other    []string `json:"other,omitempty"`
		Tunnel   []string `json:"tunnel,omitempty"`
	} `json:"interfaces"`
}

NetworkInterface struct

func (*NetworkInterface) Addresses

func (iface *NetworkInterface) Addresses() []string

Addresses returns a flat list of all MAC addresses

type NodeInfo

type NodeInfo struct {
	NodeID   string    `json:"node_id"`
	Network  Network   `json:"network"`
	Owner    *Owner    `json:"owner"`
	System   System    `json:"system"`
	Hostname string    `json:"hostname"`
	Location *Location `json:"location,omitempty"`
	Software Software  `json:"software"`
	Hardware Hardware  `json:"hardware"`
	VPN      bool      `json:"vpn"`
	Wireless *Wireless `json:"wireless,omitempty"`
}

NodeInfo struct

type Owner

type Owner struct {
	Contact string `json:"contact"`
}

Owner struct

type ResponseData

type ResponseData struct {
	Neighbours *Neighbours `json:"neighbours"`
	NodeInfo   *NodeInfo   `json:"nodeinfo"`
	Statistics *Statistics `json:"statistics"`
}

ResponseData struct

type Software

type Software struct {
	Autoupdater struct {
		Enabled bool   `json:"enabled,omitempty"`
		Branch  string `json:"branch,omitempty"`
	} `json:"autoupdater,omitempty"`
	BatmanAdv struct {
		Version string `json:"version,omitempty"`
		Compat  int    `json:"compat,omitempty"`
	} `json:"batman-adv,omitempty"`
	Babeld struct {
		Version string `json:"version,omitempty"`
	} `json:"babeld,omitempty"`
	Fastd struct {
		Enabled bool   `json:"enabled,omitempty"`
		Version string `json:"version,omitempty"`
	} `json:"fastd,omitempty"`
	Firmware struct {
		Base    string `json:"base,omitempty"`
		Release string `json:"release,omitempty"`
	} `json:"firmware,omitempty"`
	StatusPage struct {
		API int `json:"api"`
	} `json:"status-page,omitempty"`
}

Software struct

type Statistics

type Statistics struct {
	NodeID         string  `json:"node_id"`
	Clients        Clients `json:"clients"`
	RootFsUsage    float64 `json:"rootfs_usage,omitempty"`
	LoadAverage    float64 `json:"loadavg,omitempty"`
	Memory         Memory  `json:"memory,omitempty"`
	Uptime         float64 `json:"uptime,omitempty"`
	Idletime       float64 `json:"idletime,omitempty"`
	GatewayIPv4    string  `json:"gateway,omitempty"`
	GatewayIPv6    string  `json:"gateway6,omitempty"`
	GatewayNexthop string  `json:"gateway_nexthop,omitempty"`
	Processes      struct {
		Total   uint32 `json:"total"`
		Running uint32 `json:"running"`
	} `json:"processes,omitempty"`
	MeshVPN *MeshVPN `json:"mesh_vpn,omitempty"`
	Traffic struct {
		Tx      *Traffic `json:"tx"`
		Rx      *Traffic `json:"rx"`
		Forward *Traffic `json:"forward"`
		MgmtTx  *Traffic `json:"mgmt_tx"`
		MgmtRx  *Traffic `json:"mgmt_rx"`
	} `json:"traffic,omitempty"`
	Switch   map[string]*SwitchPort `json:"switch,omitempty"`
	Wireless WirelessStatistics     `json:"wireless,omitempty"`
}

Statistics struct

type SwitchPort

type SwitchPort struct {
	Speed uint32 `json:"speed"`
}

SwitchPort struct

type System

type System struct {
	SiteCode   string `json:"site_code,omitempty"`
	DomainCode string `json:"domain_code,omitempty"`
}

System struct

type Traffic

type Traffic struct {
	Bytes   float64 `json:"bytes,omitempty"`
	Packets float64 `json:"packets,omitempty"`
	Dropped float64 `json:"dropped,omitempty"`
}

Traffic struct

type WifiLink struct {
	Inactive int `json:"inactive"`
	Noise    int `json:"nois"`
	Signal   int `json:"signal"`
}

WifiLink struct

type WifiNeighbours

type WifiNeighbours struct {
	Neighbours map[string]WifiLink `json:"neighbours"`
}

WifiNeighbours struct

type Wireless

type Wireless struct {
	TxPower24 uint32 `json:"txpower24,omitempty"`
	Channel24 uint32 `json:"channel24,omitempty"`
	TxPower5  uint32 `json:"txpower5,omitempty"`
	Channel5  uint32 `json:"channel5,omitempty"`
}

Wireless struct

type WirelessAirtime

type WirelessAirtime struct {
	ChanUtil float32 // Channel utilization
	RxUtil   float32 // Receive utilization
	TxUtil   float32 // Transmit utilization

	ActiveTime uint64 `json:"active"`
	BusyTime   uint64 `json:"busy"`
	RxTime     uint64 `json:"rx"`
	TxTime     uint64 `json:"tx"`
	Noise      uint32 `json:"noise"`
	Frequency  uint32 `json:"frequency"`
}

WirelessAirtime struct

func (WirelessAirtime) FrequencyName

func (airtime WirelessAirtime) FrequencyName() string

FrequencyName returns 11g or 11a

type WirelessStatistics

type WirelessStatistics []*WirelessAirtime

WirelessStatistics struct

func (WirelessStatistics) SetUtilization

func (current WirelessStatistics) SetUtilization(previous WirelessStatistics)

SetUtilization calculates the utilization values in regard to the previous values

Jump to

Keyboard shortcuts

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