Documentation
¶
Overview ¶
Package toolhost implements the host-side toolbox for WASM sandboxes (plans/wasm-runtime.md §3).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
SandboxID string
WorkDir string
AuthToken string
Exec Executor
StateKV StateKV
Sessions *sessions.Manager
}
Config wires a toolbox host for one sandbox.
type Executor ¶
type Executor interface {
Exec(r *http.Request, req models.ExecRequest) (models.ExecResult, error)
}
Executor runs a WASM invocation for toolbox /process/execute.
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host serves toolbox HTTP routes against a sandbox workdir on the host.
type StateKV ¶
type StateKV interface {
Get(ctx context.Context, sandboxID, key string) ([]byte, bool, error)
Set(ctx context.Context, sandboxID, key string, value []byte) error
Delete(ctx context.Context, sandboxID, key string) error
ListKeys(ctx context.Context, sandboxID string) ([]string, error)
}
StateKV exposes durable host-KV over toolbox HTTP for wasm runtime=durable workloads.
Click to show internal directories.
Click to hide internal directories.