File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ type PreheatRequest struct {
27
27
Headers map [string ]string `json:"headers" validate:"omitempty"`
28
28
Application string `json:"application" validate:"omitempty"`
29
29
Priority int32 `json:"priority" validate:"omitempty"`
30
+ Scope string `json:"scope" validate:"omitempty"`
30
31
}
31
32
32
33
// PreheatResponse defines the response parameters for preheating.
Original file line number Diff line number Diff line change 16
16
17
17
package types
18
18
19
+ // Scope is the scope for preheating.
20
+ type Scope string
21
+
22
+ const (
23
+ // SingleSeedPeerScope represents the scope that only single seed peer will be preheated.
24
+ SingleSeedPeerScope Scope = "single_seed_peer"
25
+
26
+ // AllPeersScope represents the scope that all peers will be preheated.
27
+ ALLPeersScope Scope = "all_peers"
28
+ )
29
+
19
30
type CreateJobRequest struct {
20
31
BIO string `json:"bio" binding:"omitempty"`
21
32
Type string `json:"type" binding:"required"`
@@ -76,6 +87,9 @@ type PreheatArgs struct {
76
87
77
88
// The image type preheating task can specify the image architecture type. eg: linux/amd64.
78
89
Platform string `json:"platform" binding:"omitempty"`
90
+
91
+ // Scope is the scope for preheating.
92
+ Scope string `json:"scope" binding:"omitempty,oneof=single_seed_peer all_peers"`
79
93
}
80
94
81
95
type CreateGetTaskJobRequest struct {
You can’t perform that action at this time.
0 commit comments