Documentation ¶
Overview ¶
Package wasm provides WebAssembly serverless function runtimes.
Package wasm provides WebAssembly serverless function runtimes.
Package wasm provides WebAssembly serverless function runtimes.
Package wasm provides WebAssembly serverless function runtimes.
Package wasm provides WebAssembly serverless function runtimes.
Index ¶
Constants ¶
View Source
const ( WasmFuncStart = "_start" WasmFuncInit = "yomo_init" // WasmFuncObserveDataTags guest module should implement this function WasmFuncObserveDataTags = "yomo_observe_datatags" // WasmFuncObserveDataTag host module should implement this function WasmFuncObserveDataTag = "yomo_observe_datatag" WasmFuncGetWantedTarget = "yomo_get_wanted_target" WasmFuncWantedTarget = "yomo_wanted_target" WasmFuncHandler = "yomo_handler" WasmFuncWrite = "yomo_write" WasmFuncWriteWithTarget = "yomo_write_with_target" WasmFuncContextTag = "yomo_context_tag" WasmFuncContextData = "yomo_context_data" WasmFuncContextDataSize = "yomo_context_data_size" )
Define wasm import/export function names
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runtime ¶
type Runtime interface { // Init loads the wasm file, and initialize the runtime environment Init(wasmFile string) error // GetObserveDataTags returns observed datatags of the wasm sfn GetObserveDataTags() []uint32 // GetWantedTarget returns the wanted target of the wasm sfn GetWantedTarget() string // RunInit runs the init function of the wasm sfn RunInit() error // RunHandler runs the wasm application (request -> response mode) RunHandler(ctx serverless.Context) error // Close releases all the resources related to the runtime Close() error }
Runtime is the abstract interface for wasm runtime
func NewRuntime ¶
NewRuntime returns a specific wasm runtime instance according to the type parameter
Source Files ¶
Click to show internal directories.
Click to hide internal directories.