mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-15 05:02:05 +00:00
host daemon (#2)
* feat: host daemon api scaffold * fix: use sparse writes * fix: unix socket length (<108 bytes)
This commit is contained in:
parent
4028bb5a1d
commit
e2f9e54970
21 changed files with 2111 additions and 372 deletions
|
|
@ -17,6 +17,8 @@ const (
|
|||
|
||||
type ArtifactRecord struct {
|
||||
Ref contracthost.ArtifactRef
|
||||
LocalKey string
|
||||
LocalDir string
|
||||
KernelImagePath string
|
||||
RootFSPath string
|
||||
CreatedAt time.Time
|
||||
|
|
@ -32,6 +34,8 @@ type MachineRecord struct {
|
|||
Ports []contracthost.MachinePort
|
||||
Phase contracthost.MachinePhase
|
||||
Error string
|
||||
PID int
|
||||
SocketPath string
|
||||
CreatedAt time.Time
|
||||
StartedAt *time.Time
|
||||
}
|
||||
|
|
@ -45,3 +49,17 @@ type VolumeRecord struct {
|
|||
Path string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type MachineOperation string
|
||||
|
||||
const (
|
||||
MachineOperationCreate MachineOperation = "create"
|
||||
MachineOperationStop MachineOperation = "stop"
|
||||
MachineOperationDelete MachineOperation = "delete"
|
||||
)
|
||||
|
||||
type OperationRecord struct {
|
||||
MachineID contracthost.MachineID
|
||||
Type MachineOperation
|
||||
StartedAt time.Time
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue