Versions in this module Expand all Collapse all v1 v1.0.0 Nov 5, 2024 Changes in this version + const PluginContextID + type EmulatorOption struct + func NewEmulatorOption() *EmulatorOption + func (o *EmulatorOption) WithPluginConfiguration(data []byte) *EmulatorOption + func (o *EmulatorOption) WithProperty(path []string, value []byte) *EmulatorOption + func (o *EmulatorOption) WithVMConfiguration(data []byte) *EmulatorOption + func (o *EmulatorOption) WithVMContext(context types.VMContext) *EmulatorOption + type HostEmulator interface + CallOnDownstreamData func(contextID uint32, data []byte) types.Action + CallOnHttpCallResponse func(calloutID uint32, headers [][2]string, trailers [][2]string, body []byte) + CallOnRequestBody func(contextID uint32, body []byte, endOfStream bool) types.Action + CallOnRequestHeaders func(contextID uint32, headers [][2]string, endOfStream bool) types.Action + CallOnRequestTrailers func(contextID uint32, trailers [][2]string) types.Action + CallOnResponseBody func(contextID uint32, body []byte, endOfStream bool) types.Action + CallOnResponseHeaders func(contextID uint32, headers [][2]string, endOfStream bool) types.Action + CallOnResponseTrailers func(contextID uint32, trailers [][2]string) types.Action + CallOnUpstreamData func(contextID uint32, data []byte) types.Action + CloseDownstreamConnection func(contextID uint32) + CloseUpstreamConnection func(contextID uint32) + CompleteConnection func(contextID uint32) + CompleteHttpContext func(contextID uint32) + FinishVM func() bool + GetCalloutAttributesFromContext func(contextID uint32) []HttpCalloutAttribute + GetCounterMetric func(name string) (uint64, error) + GetCriticalLogs func() []string + GetCurrentHttpStreamAction func(contextID uint32) types.Action + GetCurrentRequestBody func(contextID uint32) []byte + GetCurrentRequestHeaders func(contextID uint32) [][2]string + GetCurrentResponseBody func(contextID uint32) []byte + GetCurrentResponseHeaders func(contextID uint32) [][2]string + GetDebugLogs func() []string + GetErrorLogs func() []string + GetGaugeMetric func(name string) (uint64, error) + GetHistogramMetric func(name string) (uint64, error) + GetInfoLogs func() []string + GetProperty func(path []string) ([]byte, error) + GetQueueSize func(queueID uint32) int + GetSentLocalResponse func(contextID uint32) *LocalHttpResponse + GetTickPeriod func() uint32 + GetTraceLogs func() []string + GetWarnLogs func() []string + InitializeConnection func() (contextID uint32, action types.Action) + InitializeHttpContext func() (contextID uint32) + RegisterForeignFunction func(name string, f func([]byte) []byte) + SetProperty func(path []string, data []byte) error + StartPlugin func() types.OnPluginStartStatus + StartVM func() types.OnVMStartStatus + Tick func() + func NewHostEmulator(opt *EmulatorOption) (host HostEmulator, reset func()) + type HttpCalloutAttribute struct + Body []byte + CalloutID uint32 + Headers [][2]string + Trailers [][2]string + Upstream string + type LocalHttpResponse struct + Data []byte + GRPCStatus int32 + Headers [][2]string + StatusCode uint32 + StatusCodeDetail string + type WasmVMContext interface + func NewWasmVMContext(wasm []byte) (WasmVMContext, error)