Documentation ¶
Overview ¶
Package wasm implement the wasm framework for MOSN
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyPluginName = errors.New("wasm config without plugin name") ErrUnexpectedType = errors.New("unexpected object type in map") ErrPluginNotFound = errors.New("wasm plugin not found") ErrSameWasmConfig = errors.New("update with same wasm config") ErrUpdateInstanceNum = errors.New("update instance num return 0") )
View Source
var ( ErrEngineNotFound = errors.New("fail to get wasm engine") ErrWasmBytesLoad = errors.New("fail to load wasm bytes") ErrWasmBytesIncorrect = errors.New("incorrect hash of wasm bytes") ErrInstanceCreate = errors.New("fail to create wasm instance") ErrModuleCreate = errors.New("fail to create wasm module") )
Functions ¶
func GetWasmEngine ¶
GetWasmEngine returns the wasm vm(engine) by name.
func GetWasmManager ¶
func GetWasmManager() types.WasmManager
GetWasmManager returns the global singleton of types.WasmManager.
func NewWasmPlugin ¶
func NewWasmPlugin(wasmConfig v2.WasmPluginConfig) (types.WasmPlugin, error)
func RegisterWasmEngine ¶
RegisterWasmEngine registers a wasm vm(engine).
Types ¶
type DefaultWasmPluginHandler ¶
type DefaultWasmPluginHandler struct{}
DefaultWasmPluginHandler is the default implementation of types.WasmPluginHandler.
func (*DefaultWasmPluginHandler) OnConfigUpdate ¶
func (d *DefaultWasmPluginHandler) OnConfigUpdate(config v2.WasmPluginConfig)
func (*DefaultWasmPluginHandler) OnPluginDestroy ¶
func (d *DefaultWasmPluginHandler) OnPluginDestroy(plugin types.WasmPlugin)
func (*DefaultWasmPluginHandler) OnPluginStart ¶
func (d *DefaultWasmPluginHandler) OnPluginStart(plugin types.WasmPlugin)
Click to show internal directories.
Click to hide internal directories.