forked from galaxydi/go-loghub
-
Notifications
You must be signed in to change notification settings - Fork 116
/
machine_group.go
38 lines (33 loc) · 1.1 KB
/
machine_group.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
35
36
37
38
package sls
// const MachineIDTypes
const (
MachineIDTypeIP = "ip"
MachineIDTypeUserDefined = "userdefined"
)
// MachinGroupAttribute defines machine group attribute
type MachinGroupAttribute struct {
ExternalName string `json:"externalName"`
TopicName string `json:"groupTopic"`
}
// MachineGroup defines machine group
type MachineGroup struct {
Name string `json:"groupName"`
Type string `json:"groupType"`
MachineIDType string `json:"machineIdentifyType"`
MachineIDList []string `json:"machineList"`
Attribute MachinGroupAttribute `json:"groupAttribute"`
CreateTime uint32 `json:"createTime,omitempty"`
LastModifyTime uint32 `json:"lastModifyTime,omitempty"`
}
// Machine defines machine struct
type Machine struct {
IP string
UniqueID string `json:"machine-uniqueid"`
UserdefinedID string `json:"userdefined-id"`
LastHeartBeatTime int `json:"lastHeartbeatTime"`
}
// MachineList defines machine list
type MachineList struct {
Total int
Machines []*Machine
}