Documentation ¶
Index ¶
Constants ¶
View Source
const (
PingLoss = 1.0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IfaceBwEntry ¶
type IfaceBwEntry struct { IfName string `json:"iface"` PublicKey string `json:"iface_public_key"` Peers []*PeerDataEntry `json:"peers"` }
type Message ¶
type Message struct { common.MessageHeader Data []IfaceBwEntry `json:"data"` }
func NewMessage ¶
func NewMessage() *Message
func (*Message) PingProcess ¶
Parse ping result and fill statistics for connected peers
type PeerDataEntry ¶
type PeerDataEntry struct { PublicKey string `json:"public_key"` IP string `json:"internal_ip"` Handshake string `json:"last_handshake,omitempty"` KeepAllive int `json:"keep_alive_interval"` Latency float32 `json:"latency_ms,omitempty"` Loss float32 `json:"packet_loss"` RxBytes int64 `json:"rx_bytes"` TxBytes int64 `json:"tx_bytes"` RxSpeed float32 `json:"rx_speed_mbps"` TxSpeed float32 `json:"tx_speed_mbps"` ConnectionID int `json:"connection_id"` GroupID int `json:"connection_group_id"` }
Click to show internal directories.
Click to hide internal directories.