Documentation
¶
Overview ¶
Package wasm implements the WASM/WASI container runner. Supports WasmEdge, WAMR, and Wasmtime backends.
Index ¶
- type Backend
- type Runner
- func (r *Runner) Capabilities() rt.RunnerCapabilities
- func (r *Runner) Cleanup(_ context.Context, id string) error
- func (r *Runner) Create(ctx context.Context, cfg *rt.Config) (string, error)
- func (r *Runner) Detect() bool
- func (r *Runner) Exec(_ context.Context, id string, cfg *rt.ExecConfig) (int, error)
- func (r *Runner) Inspect(_ context.Context, id string) (*rt.ContainerJSON, error)
- func (r *Runner) Kill(_ context.Context, id string, sig syscall.Signal) error
- func (r *Runner) Name() rt.ExecutionMode
- func (r *Runner) Pause(_ context.Context, id string) error
- func (r *Runner) Resume(_ context.Context, id string) error
- func (r *Runner) Start(ctx context.Context, id string) (int, error)
- func (r *Runner) Stats(_ context.Context, id string) (*rt.ContainerStats, error)
- func (r *Runner) Stop(_ context.Context, id string, timeout time.Duration) error
- func (r *Runner) Wait(_ context.Context, id string) (int, error)
- type WAMRBackend
- type WASMConfig
- type WasmEdgeBackend
- type WasmtimeBackend
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
Name() string
Detect() bool
Run(ctx context.Context, wasmPath string, cfg *WASMConfig) (int, error)
Stop(pid int) error
}
Backend represents a WASM runtime backend.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) Capabilities ¶
func (r *Runner) Capabilities() rt.RunnerCapabilities
func (*Runner) Name ¶
func (r *Runner) Name() rt.ExecutionMode
type WAMRBackend ¶
type WAMRBackend struct {
// contains filtered or unexported fields
}
func (*WAMRBackend) Detect ¶
func (b *WAMRBackend) Detect() bool
func (*WAMRBackend) Name ¶
func (b *WAMRBackend) Name() string
func (*WAMRBackend) Run ¶
func (b *WAMRBackend) Run(ctx context.Context, wasmPath string, cfg *WASMConfig) (int, error)
func (*WAMRBackend) Stop ¶
func (b *WAMRBackend) Stop(pid int) error
type WASMConfig ¶
WASMConfig holds configuration for a WASM container.
type WasmEdgeBackend ¶
type WasmEdgeBackend struct {
// contains filtered or unexported fields
}
func (*WasmEdgeBackend) Detect ¶
func (b *WasmEdgeBackend) Detect() bool
func (*WasmEdgeBackend) Name ¶
func (b *WasmEdgeBackend) Name() string
func (*WasmEdgeBackend) Run ¶
func (b *WasmEdgeBackend) Run(ctx context.Context, wasmPath string, cfg *WASMConfig) (int, error)
func (*WasmEdgeBackend) Stop ¶
func (b *WasmEdgeBackend) Stop(pid int) error
type WasmtimeBackend ¶
type WasmtimeBackend struct {
// contains filtered or unexported fields
}
func (*WasmtimeBackend) Detect ¶
func (b *WasmtimeBackend) Detect() bool
func (*WasmtimeBackend) Name ¶
func (b *WasmtimeBackend) Name() string
func (*WasmtimeBackend) Run ¶
func (b *WasmtimeBackend) Run(ctx context.Context, wasmPath string, cfg *WASMConfig) (int, error)
func (*WasmtimeBackend) Stop ¶
func (b *WasmtimeBackend) Stop(pid int) error
Click to show internal directories.
Click to hide internal directories.