forked from Meduoduo/kisara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
monitor.go
33 lines (27 loc) · 856 Bytes
/
monitor.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
package types
type KisaraNetworkMonitorImage struct {
ImageName string `json:"image_name"`
}
type KisaraNetworkMonitorContainer struct {
ContainerId string `json:"container_id"`
}
type KisaraNetworkTest struct {
// The container to be tested
ContainerId string `json:"container_id"`
// The container to test
TestContainerId string `json:"test_container_id"`
// The test cmd like "python3 test.py $ip", the $ip will be replaced by the container's ip
Script string `json:"script"`
}
type KisaraNetworkTestSet struct {
Containers []KisaraNetworkTest `json:"containers"`
}
type KisaraNetworkTestResult struct {
// The container to be tested
ContainerId string `json:"container_id"`
// Result of the test, bytewise
Result []byte `json:"result"`
}
type KisaraNetworkTestResultSet struct {
Results []KisaraNetworkTestResult `json:"results"`
}