-
-
Notifications
You must be signed in to change notification settings - Fork 222
Expand file tree
/
Copy pathschemas.go
More file actions
54 lines (44 loc) · 1.52 KB
/
schemas.go
File metadata and controls
54 lines (44 loc) · 1.52 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package api
import (
"github.com/dstackai/dstack/runner/internal/shim"
"github.com/dstackai/dstack/runner/internal/shim/components"
"github.com/dstackai/dstack/runner/internal/shim/dcgm"
)
type HealthcheckResponse struct {
Service string `json:"service"`
Version string `json:"version"`
}
type ShutdownRequest struct {
Force bool `json:"force"`
}
type InstanceHealthResponse struct {
DCGM *dcgm.Health `json:"dcgm"`
DataTransferBytes *int64 `json:"data_transfer_bytes,omitempty"`
}
type TaskListResponse struct {
Tasks []*shim.TaskListItem `json:"tasks"`
}
type TaskInfoResponse struct {
ID string `json:"id"`
Status shim.TaskStatus `json:"status"`
TerminationReason string `json:"termination_reason"`
TerminationMessage string `json:"termination_message"`
Ports []shim.PortMapping `json:"ports"`
// The following fields are for debugging only, server doesn't need them
ContainerName string `json:"container_name"`
ContainerID string `json:"container_id"`
GpuIDs []string `json:"gpus_ids"`
}
type TaskSubmitRequest = shim.TaskConfig
type TaskTerminateRequest struct {
TerminationReason string `json:"termination_reason"`
TerminationMessage string `json:"termination_message"`
Timeout uint `json:"timeout"`
}
type ComponentListResponse struct {
Components []components.ComponentInfo `json:"components"`
}
type ComponentInstallRequest struct {
Name string `json:"name"`
URL string `json:"url"`
}