Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NodeInfoSliceEqual ¶
func NodeInfoSliceEqual(a, b NodeInfoSlice) bool
NodeInfoSliceEqual determines if two instances of a NodeInfoSlice (a and b) are equal - on the basis that they contain the same list of NodeInfo structures. TODO: May need to review this function and how it determines equality. Very simplistice ATM.
func NodesAreEqual ¶
NodesAreEqual determines if two instances of a NodeInfo structure (a and b) represent the same Node based on their Keys. Not that this is not an equality check of the structure - but simply that the two structures represent the same Node. Other elements of the structure may be different.
Types ¶
type NodeInfo ¶
type NodeInfo struct { Key string `json:"key"` Conntype string `json:"type"` SendBytes int `json:"send_bytes"` RecvBytes int `json:"recv_bytes"` LastAckTime int `json:"last_ack_time"` StartTime int `json:"start_time"` }
NodeInfo structure stores of JSON response from /conn/getAll API
type NodeInfoMap ¶
NodeInfoMap defines a string key based map of NodeInfo structs
func NodeInfoSliceToMap ¶
func NodeInfoSliceToMap(nis NodeInfoSlice) NodeInfoMap
NodeInfoSliceToMap converts a provided NodeInfoSlice to a NodeInfoMap
type NodeInfoSlice ¶
type NodeInfoSlice []NodeInfo
NodeInfoSlice defines an in-memory (dynamic) array of NodeInfo structures