Documentation ¶
Index ¶
- type Interpreter
- func (intp *Interpreter) Close(ctx context.Context)
- func (intp *Interpreter) LoadProcessors(ctx context.Context, processors []string) error
- func (intp *Interpreter) Process(ctx context.Context, frm *cv.Frame) *cv.Frame
- func (intp *Interpreter) Processors() []guest.Module
- func (intp *Interpreter) RegisterGuestModule(ctx context.Context, name string, module []byte) error
- type InterpreterConfig
- type MapRefs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interpreter ¶
type Interpreter struct { Refs *MapRefs Config InterpreterConfig ModuleContext *cv.Context ProcessorConfig *config.Store // contains filtered or unexported fields }
Interpreter is a WebAssembly interpreter that can load and run guest modules.
func New ¶
func New(ctx context.Context, conf InterpreterConfig) Interpreter
New creates a new Interpreter.
func (*Interpreter) Close ¶
func (intp *Interpreter) Close(ctx context.Context)
Close closes the interpreter.
func (*Interpreter) LoadProcessors ¶
func (intp *Interpreter) LoadProcessors(ctx context.Context, processors []string) error
func (*Interpreter) Processors ¶
func (intp *Interpreter) Processors() []guest.Module
Processors returns the guest modules registered with the interpreter.
func (*Interpreter) RegisterGuestModule ¶
RegisterGuestModule registers a guest module with the interpreter.
type InterpreterConfig ¶
type MapRefs ¶
MapRefs is a [Refs] implementation powered by a map protected by a mutex. Indexes are generated randomly and checked for collisions.
Must be constructed with NewMapRefs.
Click to show internal directories.
Click to hide internal directories.