Documentation
¶
Overview ¶
Package workspace implements the authenticated host/guest Workspace RPC adapter.
Index ¶
- Variables
- type Guest
- type Workspace
- func (w *Workspace) CreateFile(ctx context.Context, path string, data []byte) (tool.FileVersion, error)
- func (w *Workspace) Glob(ctx context.Context, pattern string) ([]string, error)
- func (w *Workspace) Grep(ctx context.Context, pattern, pathGlob string) ([]tool.GrepMatch, error)
- func (w *Workspace) Read(ctx context.Context, path string) ([]byte, error)
- func (w *Workspace) ReadVersion(ctx context.Context, path string) ([]byte, tool.FileVersion, error)
- func (w *Workspace) RecordRead(path string, version tool.FileVersion)
- func (w *Workspace) RecordedVersion(path string) (tool.FileVersion, bool)
- func (w *Workspace) ReplaceFile(ctx context.Context, path string, old tool.FileVersion, data []byte) (tool.FileVersion, error)
- func (w *Workspace) Root() string
- func (w *Workspace) Stat(ctx context.Context, path string) (tool.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // It deliberately carries no backend detail because callers project it across trust boundaries. ErrAssignedRootUnavailable = errors.New("microvm assigned root is unavailable") )
Functions ¶
This section is empty.
Types ¶
type Guest ¶
type Guest struct {
// contains filtered or unexported fields
}
Guest serves the confined filesystem side of the authenticated guest protocol.
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
Workspace is the host-side mecatl adapter for one authenticated guest mount.
func (*Workspace) CreateFile ¶
func (w *Workspace) CreateFile(ctx context.Context, path string, data []byte) (tool.FileVersion, error)
CreateFile performs an atomic create-only guest mutation.
func (*Workspace) ReadVersion ¶
ReadVersion returns guest bytes and their opaque authoritative version.
func (*Workspace) RecordRead ¶
func (w *Workspace) RecordRead(path string, version tool.FileVersion)
RecordRead records the exact supplied version without guest I/O.
func (*Workspace) RecordedVersion ¶
func (w *Workspace) RecordedVersion(path string) (tool.FileVersion, bool)
RecordedVersion performs an I/O-free lookup in the host-side live ledger.
func (*Workspace) ReplaceFile ¶
func (w *Workspace) ReplaceFile(ctx context.Context, path string, old tool.FileVersion, data []byte) (tool.FileVersion, error)
ReplaceFile conditionally replaces a guest file using its opaque version.
Click to show internal directories.
Click to hide internal directories.