Documentation
¶
Overview ¶
Package external hosts trusted Runtime Protocol v1 executables.
Index ¶
- type CommandExitError
- type Host
- func (h *Host) CommandContainerArgv(ctx context.Context, workspaceID string, argv []string, streams driver.Streams) error
- func (h *Host) CommandDevContainer(ctx context.Context, params *driver.CommandParams) error
- func (h *Host) DeleteDevContainer(ctx context.Context, workspaceID string) error
- func (h *Host) FindDevContainer(ctx context.Context, workspaceID string) (*config.ContainerDetails, error)
- func (h *Host) GetDevContainerLogs(ctx context.Context, workspaceID string, stdout, _ io.Writer) error
- func (h *Host) Info() *runtimev1.InfoResponse
- func (h *Host) Preflight(ctx context.Context, options driver.PreflightOptions) error
- func (h *Host) ProvisioningPreflight(ctx context.Context) error
- func (h *Host) RunImage(ctx context.Context, request *runtimev1.RunImageRequest) error
- func (h *Host) StartDevContainer(ctx context.Context, workspaceID string) error
- func (h *Host) StopDevContainer(ctx context.Context, workspaceID string) error
- func (h *Host) TargetArchitecture(ctx context.Context, workspaceID string) (string, error)
- type RuntimeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandExitError ¶
CommandExitError describes an ordinary command failure, distinct from an RPC failure.
func (*CommandExitError) Error ¶
func (e *CommandExitError) Error() string
func (*CommandExitError) ExitCode ¶
func (e *CommandExitError) ExitCode() int
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host opens an owned plugin session per operation. It is not yet registered as a workspace driver; factory integration is a separate stage.
func New ¶
New discovers a prepared runtime without downloading it and negotiates Info. The running Devsy executable supplies the trusted supervisor entry point.
func (*Host) CommandContainerArgv ¶
func (h *Host) CommandContainerArgv( ctx context.Context, workspaceID string, argv []string, streams driver.Streams, ) error
CommandContainerArgv preserves literal argv and raw stdout for binary agent injection. Stdin ownership and cancellation follow CommandDevContainer.
func (*Host) CommandDevContainer ¶
CommandDevContainer uses the container shell; RawStdout preserves protocol bytes. Once streaming starts, the host closes closable stdin on completion or cancellation. Blocking readers must unblock on Close or caller cancellation; writers must return from Write. Arbitrary io.Reader/io.Writer calls cannot be interrupted by a context.
func (*Host) DeleteDevContainer ¶
func (*Host) FindDevContainer ¶
func (*Host) GetDevContainerLogs ¶
func (h *Host) GetDevContainerLogs( ctx context.Context, workspaceID string, stdout, _ io.Writer, ) error
GetDevContainerLogs writes the protocol's merged binary stream to stdout. Stderr is unused because Runtime Protocol v1 Logs has no channel identity.
func (*Host) Info ¶
func (h *Host) Info() *runtimev1.InfoResponse
Info returns a copy of the negotiated capabilities.
func (*Host) ProvisioningPreflight ¶
func (*Host) RunImage ¶
RunImage accepts resolved protocol intent; driver conversion is a later stage.
func (*Host) StartDevContainer ¶
func (*Host) StopDevContainer ¶
type RuntimeError ¶
type RuntimeError struct {
Operation string
Code codes.Code
Category runtimev1.RuntimeErrorCode
Retryable bool
Message string
}
RuntimeError preserves canonical and runtime error categories without keeping secret-bearing backend diagnostics in a caller-visible error.
func (*RuntimeError) Error ¶
func (e *RuntimeError) Error() string
func (*RuntimeError) GRPCStatus ¶
func (e *RuntimeError) GRPCStatus() *status.Status