computer-host/contract/machines.go
Harivansh Rathi 4028bb5a1d feat: freeze ssh and vnc port contracts
Define the minimum machine networking surface for the next host slice and
limit exposed guest ports to SSH and VNC.
2026-04-08 02:47:27 +00:00

34 lines
1,012 B
Go

package host
import "time"
type Machine struct {
ID MachineID `json:"id"`
Artifact ArtifactRef `json:"artifact"`
SystemVolumeID VolumeID `json:"system_volume_id,omitempty"`
UserVolumeIDs []VolumeID `json:"user_volume_ids,omitempty"`
RuntimeHost string `json:"runtime_host,omitempty"`
Ports []MachinePort `json:"ports,omitempty"`
Phase MachinePhase `json:"phase"`
Error string `json:"error,omitempty"`
CreatedAt time.Time `json:"created_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
}
type CreateMachineRequest struct {
MachineID MachineID `json:"machine_id"`
Artifact ArtifactRef `json:"artifact"`
UserVolumeIDs []VolumeID `json:"user_volume_ids,omitempty"`
}
type CreateMachineResponse struct {
Machine Machine `json:"machine"`
}
type GetMachineResponse struct {
Machine Machine `json:"machine"`
}
type ListMachinesResponse struct {
Machines []Machine `json:"machines"`
}