-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnodeInfo.go
34 lines (28 loc) · 1.29 KB
/
nodeInfo.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package goiw
import ()
type NodeInfo struct {
AppName string `json:"appName"`
AppVersion string `json:"appVersion"`
Duration int `json:"duration"`
JREAvailableProcessors int `json:"jreAvailableProcessors"`
JREFreeMemory int `json:"jreFreeMemory"`
JREMaxMemory int `json:"jreMaxMemory"`
JRETotalMemory int `json:"jreTotalMemory"`
LatestMilestone string `json:"latestMilestone"`
LatestMilestoneIndex int `json:"latestMilestoneIndex"`
LatestSolidSubtangleMilestone string `json:"latestSolidSubtangleMilestone"`
LatestSolidSubtangleMilestoneIndex int `json:"latestSolidSubtangleMilestoneIndex"`
Neighbors int `json:"neighbors"`
PacketsQueueSize int `json:"packetsQueueSize"`
Time int `json:"time"`
Tips int `json:"tips"`
TransactionsToRequest int `json:"transactionsToRequest"`
}
func (c *Client) GetNodeInfo() (NodeInfo, error) {
command := Command{
Command: "getNodeInfo",
}
nodeInfo := NodeInfo{}
err := c.do(command, &nodeInfo)
return nodeInfo, err
}