mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-15 20:03:06 +00:00
feat: init firecracker
This commit is contained in:
commit
3a256dc6e2
7 changed files with 757 additions and 0 deletions
31
internal/firecracker/state.go
Normal file
31
internal/firecracker/state.go
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
package firecracker
|
||||
|
||||
import "time"
|
||||
|
||||
// Phase represents the lifecycle phase of a local microVM.
|
||||
type Phase string
|
||||
|
||||
const (
|
||||
// PhaseProvisioning means host-local resources are still being prepared.
|
||||
PhaseProvisioning Phase = "provisioning"
|
||||
// PhaseRunning means the Firecracker process is live.
|
||||
PhaseRunning Phase = "running"
|
||||
// PhaseStopped means the VM is no longer running.
|
||||
PhaseStopped Phase = "stopped"
|
||||
// PhaseMissing means the machine is not known to the runtime.
|
||||
PhaseMissing Phase = "missing"
|
||||
// PhaseError means the runtime observed a terminal failure.
|
||||
PhaseError Phase = "error"
|
||||
)
|
||||
|
||||
// MachineState describes the current host-local state for a machine.
|
||||
type MachineState struct {
|
||||
ID MachineID
|
||||
Phase Phase
|
||||
PID int
|
||||
RuntimeHost string
|
||||
SocketPath string
|
||||
TapName string
|
||||
StartedAt *time.Time
|
||||
Error string
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue