mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-15 07:04:43 +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
|
|
@ -2,11 +2,14 @@ package store
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/getcompanion-ai/computer-host/internal/model"
|
||||
contracthost "github.com/getcompanion-ai/computer-host/contract"
|
||||
)
|
||||
|
||||
var ErrNotFound = errors.New("store: not found")
|
||||
|
||||
type Store interface {
|
||||
PutArtifact(context.Context, model.ArtifactRecord) error
|
||||
GetArtifact(context.Context, contracthost.ArtifactRef) (*model.ArtifactRecord, error)
|
||||
|
|
@ -21,4 +24,7 @@ type Store interface {
|
|||
ListVolumes(context.Context) ([]model.VolumeRecord, error)
|
||||
UpdateVolume(context.Context, model.VolumeRecord) error
|
||||
DeleteVolume(context.Context, contracthost.VolumeID) error
|
||||
UpsertOperation(context.Context, model.OperationRecord) error
|
||||
ListOperations(context.Context) ([]model.OperationRecord, error)
|
||||
DeleteOperation(context.Context, contracthost.MachineID) error
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue