Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionInfo ¶
type ExecutionInfo interface { ExecutionId() string Buffers() utils.OutputBuffers Messages() []utils.LogMessage Result() any }
func CallFunction ¶
type HostFunctionOption ¶
type HostFunctionOption func(*hostFunction)
func WithCancelledMessage ¶
func WithCancelledMessage(text string) HostFunctionOption
func WithCompletedMessage ¶
func WithCompletedMessage(text string) HostFunctionOption
func WithErrorMessage ¶
func WithErrorMessage(text string) HostFunctionOption
func WithMessageDetail ¶
func WithMessageDetail(fn any) HostFunctionOption
func WithStartingMessage ¶
func WithStartingMessage(text string) HostFunctionOption
type WasmHost ¶
type WasmHost interface { RegisterHostFunction(modName, funcName string, fn any, opts ...HostFunctionOption) error CallFunction(ctx context.Context, fnInfo functions.FunctionInfo, parameters map[string]any) (ExecutionInfo, error) CallFunctionByName(ctx context.Context, fnName string, paramValues ...any) (ExecutionInfo, error) Close(ctx context.Context) CompileModule(ctx context.Context, bytes []byte) (wazero.CompiledModule, error) GetFunctionInfo(fnName string) (functions.FunctionInfo, error) GetFunctionRegistry() functions.FunctionRegistry GetModuleInstance(ctx context.Context, plugin *plugins.Plugin, buffers utils.OutputBuffers) (wasm.Module, error) }
func GetWasmHost ¶
func InitWasmHost ¶
Click to show internal directories.
Click to hide internal directories.