Skip to content

Commit

Permalink
Add HostStatus enum (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
dangra authored Aug 13, 2024
1 parent ed17935 commit 12c9d21
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ const (
DefaultGPUVMSize = "performance-8x"
)

type HostStatus string

var (
HostStatusOk HostStatus = "ok"
HostStatusUnknown HostStatus = "unknown"
HostStatusUnreachable HostStatus = "unreachable"
)

type Machine struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Expand All @@ -50,7 +58,7 @@ type Machine struct {
Config *MachineConfig `json:"config,omitempty"`
Events []*MachineEvent `json:"events,omitempty"`
Checks []*MachineCheckStatus `json:"checks,omitempty"`
HostStatus string `json:"host_status,omitempty"`
HostStatus HostStatus `json:"host_status,omitempty" enums:"ok,unknown,unreachable"`
LeaseNonce string `json:"nonce,omitempty"`
}

Expand Down

0 comments on commit 12c9d21

Please sign in to comment.