Documentation ¶
Index ¶
- func CallExportedOnExit(wasmFile []byte)
- func CallExportedOnLoad(wasmFile []byte)
- func CreateWasmRuntime(ctx context.Context) wazero.Runtime
- func ExecHandleFunction(function api.Function, module api.Module, ctx context.Context, ...) (bytes []byte, err error)
- func ExecHandleFunctionForHttp(function api.Function, module api.Module, ctx context.Context, reqId uint64) (bytes []byte, err error)
- func ExecHandleVoidFunction(function api.Function, module api.Module, ctx context.Context, ...) (err error)
- func ExecVoidFunction(function api.Function, module api.Module, ctx context.Context) (err error)
- func GetModuleFunctionForHttp(wasmFile []byte) (module api.Module, function api.Function, context context.Context)
- func GetModuleInstance(wasmFile []byte) (api.Module, context.Context)
- func GetNewWasmRuntime(wasmFile []byte) (runtime wazero.Runtime, module api.Module, function api.Function, ...)
- func GetNewWasmRuntimeForMqtt(wasmFile []byte) (runtime wazero.Runtime, module api.Module, function api.Function, ...)
- func GetNewWasmRuntimeForNats(wasmFile []byte) (runtime wazero.Runtime, module api.Module, function api.Function, ...)
- func GetPackedPtrPositionAndSize(result []uint64) (ptrPos uint32, size uint32)
- func GetWasmFileFromUrl(wasmFileUrl, wasmFilePath string) ([]byte, error)
- func GetWasmRuntimeAndModuleInstances(wasmFile []byte) (wazero.Runtime, api.Module, context.Context)
- func ReserveMemorySpaceFor(s string, wm api.Module, ctx context.Context) (pos uint64, length uint64, free api.Function, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallExportedOnExit ¶
func CallExportedOnExit(wasmFile []byte)
func CallExportedOnLoad ¶
func CallExportedOnLoad(wasmFile []byte)
func ExecHandleFunction ¶
func ExecHandleFunction(function api.Function, module api.Module, ctx context.Context, params ...uint64) (bytes []byte, err error)
ExecHandleFunction : params: pos1, length1, pos2, length2, ... Used by capsule-launcher/services/cli/cli.go - Execute
func ExecHandleFunctionForHttp ¶
func ExecHandleFunctionForHttp(function api.Function, module api.Module, ctx context.Context, reqId uint64) (bytes []byte, err error)
ExecHandleFunctionForHttp : params: reqId Used by capsule-launcher/services/http/httpfiber.go - FiberServe
func ExecHandleVoidFunction ¶
func ExecHandleVoidFunction(function api.Function, module api.Module, ctx context.Context, params ...uint64) (err error)
ExecHandleVoidFunction : params: pos1, length1, pos2, length2, ... Used by capsule-launcher/services/mqtt/mqtt.go - setHandler Used by capsule-launcher/services/nats/listen.go - Listen
func ExecVoidFunction ¶
ExecVoidFunction : Used by capsule-launcher/services/wasmrt/wasmrunner.go - CallExportedOnExit - CallExportedOnLoad
func GetModuleFunctionForHttp ¶
func GetModuleFunctionForHttp(wasmFile []byte) (module api.Module, function api.Function, context context.Context)
GetModuleFunctionForHttp : Used by capsule-launcher/services/http/httpfiber.go - FiberServe
func GetNewWasmRuntime ¶
func GetNewWasmRuntime(wasmFile []byte) (runtime wazero.Runtime, module api.Module, function api.Function, context context.Context)
GetNewWasmRuntime : Used by capsule-launcher/services/cli/cli.go - Execute
func GetNewWasmRuntimeForMqtt ¶
func GetNewWasmRuntimeForMqtt(wasmFile []byte) (runtime wazero.Runtime, module api.Module, function api.Function, context context.Context)
GetNewWasmRuntimeForMqtt : Used by capsule-launcher/services/mqtt/mqtt.go - setHandler
func GetNewWasmRuntimeForNats ¶
func GetNewWasmRuntimeForNats(wasmFile []byte) (runtime wazero.Runtime, module api.Module, function api.Function, context context.Context)
GetNewWasmRuntimeForNats : Used by capsule-launcher/services/nats/listen.go - Listen
func GetWasmFileFromUrl ¶
func ReserveMemorySpaceFor ¶
func ReserveMemorySpaceFor(s string, wm api.Module, ctx context.Context) (pos uint64, length uint64, free api.Function, err error)
ReserveMemorySpaceFor : Reserve a place for a string parameter in the wasm module shared memory Used by capsule-launcher/services/cli/cli.go - Execute Used by capsule-launcher/services/mqtt/mqtt.go - setHandler Used by capsule-launcher/services/nats/listen.go - Listen
Types ¶
This section is empty.