Documentation ¶
Index ¶
- type BabelLink
- type BabelNeighbours
- type BatadvNeighbours
- type BatmanLink
- type Clients
- type DHCP
- type Hardware
- type Location
- type Memory
- type MeshVPN
- type MeshVPNPeerGroup
- type MeshVPNPeerLink
- type Neighbours
- type Network
- type NetworkInterface
- type Nodeinfo
- type Owner
- type ProcStats
- type ProcStatsCPU
- type ResponseData
- type Software
- type Statistics
- type SwitchPort
- type System
- type Traffic
- type WifiLink
- type WifiNeighbours
- type Wireless
- type WirelessAirtime
- type WirelessStatistics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BabelLink ¶
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 ¶
BatmanLink struct
type Clients ¶
type Clients struct { Wifi uint32 `json:"wifi"` Wifi24 uint32 `json:"wifi24"` Wifi5 uint32 `json:"wifi5"` OWE uint32 `json:"owe"` OWE24 uint32 `json:"owe24"` OWE5 uint32 `json:"owe5"` Total uint32 `json:"total"` }
Clients struct
type DHCP ¶ added in v1.2.1
type DHCP struct { // Packet counters Decline uint32 `json:"dhcp_decline"` Offer uint32 `json:"dhcp_offer"` Ack uint32 `json:"dhcp_ack"` Nak uint32 `json:"dhcp_nak"` Request uint32 `json:"dhcp_request"` Discover uint32 `json:"dhcp_discover"` Inform uint32 `json:"dhcp_inform"` Release uint32 `json:"dhcp_release"` LeasesAllocated uint32 `json:"leases_allocated_4"` LeasesPruned uint32 `json:"leases_pruned_4"` }
DHCP 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,omitempty"` Available int64 `json:"available,omitempty"` }
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 ¶
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][]string `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 ¶ added in v1.2.1
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 ProcStats ¶ added in v1.2.1
type ProcStats struct { CPU ProcStatsCPU `json:"cpu"` Intr int64 `json:"intr"` ContextSwitches int64 `json:"ctxt"` SoftIRQ int64 `json:"softirq"` Processes int64 `json:"processes"` }
ProcStats struct
type ProcStatsCPU ¶ added in v1.2.1
type ProcStatsCPU struct { User int64 `json:"user"` Nice int64 `json:"nice"` System int64 `json:"system"` Idle int64 `json:"idle"` IOWait int64 `json:"iowait"` IRQ int64 `json:"irq"` SoftIRQ int64 `json:"softirq"` }
ProcStatsCPU struct
type ResponseData ¶
type ResponseData struct { Neighbours *Neighbours `json:"neighbours"` Nodeinfo *Nodeinfo `json:"nodeinfo"` Statistics *Statistics `json:"statistics"` CustomFields map[string]interface{} `json:"-"` }
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"` PublicKey string `json:"public_key,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"` WireGuard *struct { Enabled bool `json:"enabled,omitempty"` PublicKey string `json:"public_key,omitempty"` Version string `json:"version,omitempty"` } `json:"wireguard,omitempty"` }
Software struct
type Statistics ¶
type Statistics struct { NodeID string `json:"node_id"` Clients Clients `json:"clients"` DHCP *DHCP `json:"dhcp"` 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"` GatewayTQ float64 `json:"gateway_tq,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"` ProcStats *ProcStats `json:"stat,omitempty"` }
Statistics struct
type System ¶
type System struct { SiteCode string `json:"site_code,omitempty"` DomainCode string `json:"domain_code,omitempty"` PrimaryDomainCode string `json:"primary_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 ¶
type WifiLink struct { Inactive int `json:"inactive"` Noise int `json:"nois"` Signal int `json:"signal"` }
WifiLink struct
type WifiNeighbours ¶
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 int32 `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