wasm

package
v1.0.1-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogLevel    = "wasm.log"
	HeaderLevel = "wasm.header"
)

Variables

This section is empty.

Functions

func ContextDone

func ContextDone(wrapper *ABIContextWrapper) error

ContextDone put wasmInstance back to Pool.

func GetServiceRootID

func GetServiceRootID(name string) int32

func InitWasmManager

func InitWasmManager(model *model.WasmConfig)

InitWasmManager loads config in conf.yaml

Types

type ABIContextWrapper

type ABIContextWrapper struct {
	ContextID int32

	Context *proxywasm.ABIContext
	// contains filtered or unexported fields
}

ABIContextWrapper is a request wrapper which indicates request was handled in the wasmInstance.

func CreateABIContextByName

func CreateABIContextByName(name string, ctx *http.HttpContext) *ABIContextWrapper

CreateAbIContextByName create abiContext according to every request

type WasmConfig

type WasmConfig struct {
	Path string `yaml:"path" json:"path,omitempty"`
}

WasmConfig contains config about every wasmFile.

type WasmManager

type WasmManager struct {
	// contains filtered or unexported fields
}

type WasmService

type WasmService struct {
	// contains filtered or unexported fields
}

WasmService manages a collection of WasmInstances of the same type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL