-
Notifications
You must be signed in to change notification settings - Fork 599
/
Copy pathagent.go
39 lines (31 loc) · 1.05 KB
/
agent.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
39
package model
import "mime/multipart"
type InitAgentReq struct {
AgentID
Version string `json:"version" required:"true"`
NodeType string `json:"node_type" required:"true"`
}
type AgentID struct {
NodeID string `json:"node_id" required:"true"`
AvailableWorkload int `json:"available_workload" required:"true"`
NodeType string `json:"node_type"`
}
type AgentUpgrade struct {
Version string `json:"version" required:"true"`
NodeIDs []string `json:"node_ids" required:"true"`
}
type AgentPluginEnable struct {
PluginName string `json:"plugin_name" required:"true"`
Version string `json:"version" required:"true"`
NodeID string `json:"node_id" required:"true"`
}
type AgentPluginDisable struct {
PluginName string `json:"plugin_name" required:"true"`
NodeID string `json:"node_id" required:"true"`
}
type ListAgentVersionResp struct {
Versions []string `json:"versions" required:"true"`
}
type BinUploadRequest struct {
Tarball multipart.File `formData:"tarball" json:"tarball" validate:"required" required:"true"`
}