Documentation
¶
Index ¶
- type CompileError
- type Debuglet
- func (d *Debuglet) Close(ctx context.Context) error
- func (d *Debuglet) GetSCIONAddr() string
- func (d *Debuglet) ID() uuid.UUID
- func (d *Debuglet) InitRuntime(ctx context.Context, wasmBytes []byte) error
- func (d *Debuglet) Registry() *socket.SocketRegistry
- func (d *Debuglet) Run(ctx context.Context, outputCh chan<- []byte, args []string) error
- func (d *Debuglet) StartServers(ctx context.Context, req StartServersReq) error
- type StartServersReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompileError ¶
type CompileError struct{ Err error }
CompileError is a module that wazero did not compile. Err is wazero's description of the failure, which can quote names from the module itself.
func (*CompileError) Error ¶
func (e *CompileError) Error() string
func (*CompileError) Unwrap ¶
func (e *CompileError) Unwrap() error
type Debuglet ¶
type Debuglet struct {
// contains filtered or unexported fields
}
Debuglet is the engine that loads, initialises, and runs a single WASM debuglet module. One Debuglet instance corresponds to one session.
func New ¶
func New(logger *zap.Logger, debugletID uuid.UUID, transactionID string, policy scheduler.Policy, operator netpolicy.Operator, schedule *tesla.KeySchedule, limiter *app.Limiter, pc ratelimit.PacketCount, iface *net.Interface, portManager *socket.PortManager) *Debuglet
New creates a ready-to-initialise Debuglet backed by a wazero Runtime. operator is the executor's network policy; together with the run's declared destinations it decides every transport the guest can use.
func (*Debuglet) Close ¶
Close terminates owned I/O and runtime resources exactly once. While InitRuntime is still running, Close leaves the runtime and any compiled module it published to InitRuntime, which releases them once on return. It does not wait for Run or its caller's watcher: the executor joins those separately. The context reaches wazero; it cannot force an arbitrary socket Close to end.
func (*Debuglet) GetSCIONAddr ¶
GetSCIONAddr returns the local SCION address of the server listener started during Init.
func (*Debuglet) InitRuntime ¶
InitRuntime starts the network servers and compiles and instantiates the WASM module. It must be called exactly once before Run.
func (*Debuglet) Registry ¶
func (d *Debuglet) Registry() *socket.SocketRegistry
func (*Debuglet) Run ¶
Run executes the debuglet's "_start" WASM export, streams stdout/stderr back through outputCh, and returns any execution error. The outputCh channel is closed when the debuglet finishes execution.
func (*Debuglet) StartServers ¶
func (d *Debuglet) StartServers(ctx context.Context, req StartServersReq) error
startServers starts the network listeners required by this debuglet instance. Currently only the SCION/UDP listener is active; TCP and plain UDP are reserved for future use.
type StartServersReq ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package netpolicy holds the one network policy the executor applies to guest traffic: which transports a guest may use, which destinations it may reach, and on which ports.
|
Package netpolicy holds the one network policy the executor applies to guest traffic: which transports a guest may use, which destinations it may reach, and on which ports. |
|
Package wasm contains the WASM host function implementations that are imported by WASM modules at runtime.
|
Package wasm contains the WASM host function implementations that are imported by WASM modules at runtime. |