diff --git a/machine_types.go b/machine_types.go index f2e7ec5..f350aa0 100644 --- a/machine_types.go +++ b/machine_types.go @@ -53,14 +53,15 @@ type Machine struct { InstanceID string `toml:"instance_id,omitempty" json:"instance_id,omitempty"` Version string `toml:"version,omitempty" json:"version,omitempty"` // PrivateIP is the internal 6PN address of the machine. - PrivateIP string `toml:"private_ip,omitempty" json:"private_ip,omitempty"` - CreatedAt string `toml:"created_at,omitempty" json:"created_at,omitempty"` - UpdatedAt string `toml:"updated_at,omitempty" json:"updated_at,omitempty"` - Config *MachineConfig `toml:"config,omitempty" json:"config,omitempty"` - Events []*MachineEvent `toml:"events,omitempty" json:"events,omitempty"` - Checks []*MachineCheckStatus `toml:"checks,omitempty" json:"checks,omitempty"` - LeaseNonce string `toml:"nonce,omitempty" json:"nonce,omitempty"` - HostStatus HostStatus `toml:"host_status,omitempty" json:"host_status,omitempty" enums:"ok,unknown,unreachable"` + PrivateIP string `json:"private_ip,omitempty"` + CreatedAt string `json:"created_at,omitempty"` + UpdatedAt string `json:"updated_at,omitempty"` + Config *MachineConfig `json:"config,omitempty"` + Events []*MachineEvent `json:"events,omitempty"` + Checks []*MachineCheckStatus `json:"checks,omitempty"` + LeaseNonce string `json:"nonce,omitempty"` + HostStatus HostStatus `json:"host_status,omitempty" enums:"ok,unknown,unreachable"` + ContainerStatuses []*ContainerStatus `json:"containers,omitempty"` // When `host_status` isn't "ok", the config can't be fully retrieved and has to be rebuilt from multiple sources // to form an partial configuration, not suitable to clone or recreate the original machine @@ -753,6 +754,11 @@ type MachineServiceConcurrency struct { SoftLimit int `toml:"soft_limit,omitempty" json:"soft_limit,omitempty"` } +type ContainerStatus struct { + Name string `json:"name"` + State string `json:"state"` +} + type MachineConfig struct { // Fields managed from fly.toml // If you add anything here, ensure appconfig.Config.ToMachine() is updated