Versions in this module Expand all Collapse all v0 v0.2.0-dev.1 May 10, 2023 v0.1.0 Feb 15, 2023 Changes in this version + var ErrInvalidMetricType = errors.New("invalid metric type") + func DownstreamDataProperty(p api.PropertyHolder) ioBufferProperty + func GetBaseContext(id string) api.Context + func HTTPRequestBodyProperty(p api.PropertyHolder) ioBufferProperty + func HTTPRequestProperty(p api.PropertyHolder) httpRequestProperty + func HTTPResponseBodyProperty(p api.PropertyHolder) ioBufferProperty + func HTTPResponseProperty(p api.PropertyHolder) httpResponseProperty + func NewBytesDataSource(bytes []byte) api.DataSource + func NewContext(rootID string) api.Context + func NewDefaultHostFunctions() api.ImportsHandler + func NewFileDataSource(fs fs.FS, filename string) api.DataSource + func NewFilterContext(plugin api.WasmPlugin, properties api.PropertyHolder) (api.FilterContext, error) + func NewPrometheusMetricHandler(registry *prometheus.Registry, logger logr.Logger) api.MetricHandler + func NewPropertyHolderWrapper(properties api.PropertyHolder, parentProperties api.PropertyHolder) api.WrappedPropertyHolder + func NewRuntimeCreatorStore() api.RuntimeCreatorStore + func NewStreamHandler(pm api.WasmPluginManager, filters []api.WasmPluginConfig) (api.StreamHandler, error) + func NewURLDataSource(url string) api.DataSource + func NewVMStore(runtimeCreators api.RuntimeCreatorStore, logger logr.Logger) api.VMStore + func NewWasmPluginManager(vms api.VMStore, baseContext api.Context, logger logr.Logger) api.WasmPluginManager + func NewWasmVM(runtime api.WasmRuntime) api.WasmVM + func PluginProperty(p api.PropertyHolder) pluginProperty + func RootABIContextProperty(p api.PropertyHolder) rootABIContextProperty + func StopWasmContext(contextID int32, abiContext api.ContextHandler, logger logr.Logger) error + func Stringify(value interface{}) string + func TickerDoneChannelProperty(p api.PropertyHolder) tickerDoneChannelProperty + func UpstreamDataProperty(p api.PropertyHolder) ioBufferProperty + func UsedFiltersStreamOption(filterNames ...string) api.StreamOption + type DefaultHostFunctions struct + func (d *DefaultHostFunctions) CallForeignFunction(funcName string, param []byte) ([]byte, api.WasmResult) + func (d *DefaultHostFunctions) CancelGrpcCall(token int32) api.WasmResult + func (d *DefaultHostFunctions) CloseGrpcCall(token int32) api.WasmResult + func (d *DefaultHostFunctions) DefineMetric(metricType api.MetricType, name string) (int32, api.WasmResult) + func (d *DefaultHostFunctions) Done() api.WasmResult + func (d *DefaultHostFunctions) GetCurrentTimeNanoseconds() (int32, api.WasmResult) + func (d *DefaultHostFunctions) GetCustomBuffer(bufferType api.BufferType) api.IoBuffer + func (d *DefaultHostFunctions) GetCustomHeader(mapType api.MapType) api.HeaderMap + func (d *DefaultHostFunctions) GetDownStreamData() api.IoBuffer + func (d *DefaultHostFunctions) GetFuncCallData() api.IoBuffer + func (d *DefaultHostFunctions) GetGrpcReceiveBuffer() api.IoBuffer + func (d *DefaultHostFunctions) GetGrpcReceiveInitialMetaData() api.HeaderMap + func (d *DefaultHostFunctions) GetGrpcReceiveTrailerMetaData() api.HeaderMap + func (d *DefaultHostFunctions) GetHttpCallResponseBody() api.IoBuffer + func (d *DefaultHostFunctions) GetHttpCallResponseHeaders() api.HeaderMap + func (d *DefaultHostFunctions) GetHttpCallResponseTrailer() api.HeaderMap + func (d *DefaultHostFunctions) GetHttpRequestBody() api.IoBuffer + func (d *DefaultHostFunctions) GetHttpRequestHeader() api.HeaderMap + func (d *DefaultHostFunctions) GetHttpRequestTrailer() api.HeaderMap + func (d *DefaultHostFunctions) GetHttpResponseBody() api.IoBuffer + func (d *DefaultHostFunctions) GetHttpResponseHeader() api.HeaderMap + func (d *DefaultHostFunctions) GetHttpResponseTrailer() api.HeaderMap + func (d *DefaultHostFunctions) GetMetric(metricID int32) (int64, api.WasmResult) + func (d *DefaultHostFunctions) GetPluginConfig() api.IoBuffer + func (d *DefaultHostFunctions) GetProperty(key string) (string, api.WasmResult) + func (d *DefaultHostFunctions) GetRootContextID() int32 + func (d *DefaultHostFunctions) GetUpstreamData() api.IoBuffer + func (d *DefaultHostFunctions) GetVmConfig() api.IoBuffer + func (d *DefaultHostFunctions) GrpcCall(grpcService string, serviceName string, method string, data api.IoBuffer, ...) (int32, api.WasmResult) + func (d *DefaultHostFunctions) HttpCall(url string, headers api.HeaderMap, body api.IoBuffer, trailer api.HeaderMap, ...) (int32, api.WasmResult) + func (d *DefaultHostFunctions) IncrementMetric(metricID int32, offset int64) api.WasmResult + func (d *DefaultHostFunctions) Log(level api.LogLevel, msg string) api.WasmResult + func (d *DefaultHostFunctions) OpenGrpcStream(grpcService string, serviceName string, method string) (int32, api.WasmResult) + func (d *DefaultHostFunctions) RecordMetric(metricID int32, value int64) api.WasmResult + func (d *DefaultHostFunctions) RemoveMetric(metricID int32) api.WasmResult + func (d *DefaultHostFunctions) ResumeDownstream() api.WasmResult + func (d *DefaultHostFunctions) ResumeHttpRequest() api.WasmResult + func (d *DefaultHostFunctions) ResumeHttpResponse() api.WasmResult + func (d *DefaultHostFunctions) ResumeUpstream() api.WasmResult + func (d *DefaultHostFunctions) SendGrpcCallMsg(token int32, data api.IoBuffer, endOfStream int32) api.WasmResult + func (d *DefaultHostFunctions) SendHttpResp(respCode int32, respCodeDetail api.IoBuffer, respBody api.IoBuffer, ...) api.WasmResult + func (d *DefaultHostFunctions) SetEffectiveContextID(contextID int32) api.WasmResult + func (d *DefaultHostFunctions) SetProperty(key string, value string) api.WasmResult + func (d *DefaultHostFunctions) SetTickPeriodMilliseconds(tickPeriodMilliseconds int32) api.WasmResult + func (d *DefaultHostFunctions) Wait() api.Action + type HeaderMap interface + Flatten func() map[string]string + func NewHeaders(headers api.HeaderMap, logger logr.Logger) HeaderMap + type Headers struct + func (h *Headers) Add(key, value string) + func (h *Headers) ByteSize() uint64 + func (h *Headers) Clone() pwapi.HeaderMap + func (h *Headers) Del(key string) + func (h *Headers) Flatten() map[string]string + func (h *Headers) Get(key string) (value string, found bool) + func (h *Headers) Range(f func(key string, value string) bool) + func (h *Headers) Set(key, value string) + type HostFunctions struct + func NewHostFunctions(properties api.PropertyHolder, options ...HostFunctionsOption) *HostFunctions + func (f *HostFunctions) CallForeignFunction(funcName string, param []byte) ([]byte, pwapi.WasmResult) + func (f *HostFunctions) DefineMetric(metricType pwapi.MetricType, name string) (int32, pwapi.WasmResult) + func (f *HostFunctions) Done() pwapi.WasmResult + func (f *HostFunctions) GetDownStreamData() pwapi.IoBuffer + func (f *HostFunctions) GetHttpRequestBody() pwapi.IoBuffer + func (f *HostFunctions) GetHttpRequestHeader() pwapi.HeaderMap + func (f *HostFunctions) GetHttpResponseBody() pwapi.IoBuffer + func (f *HostFunctions) GetHttpResponseHeader() pwapi.HeaderMap + func (f *HostFunctions) GetPluginConfig() pwapi.IoBuffer + func (f *HostFunctions) GetProperty(key string) (string, pwapi.WasmResult) + func (f *HostFunctions) GetUpstreamData() pwapi.IoBuffer + func (f *HostFunctions) IncrementMetric(metricID int32, offset int64) pwapi.WasmResult + func (f *HostFunctions) Log(level pwapi.LogLevel, msg string) pwapi.WasmResult + func (f *HostFunctions) Logger() logr.Logger + func (f *HostFunctions) RecordMetric(metricID int32, value int64) pwapi.WasmResult + func (f *HostFunctions) SendHttpResp(respCode int32, respCodeDetail pwapi.IoBuffer, respBody pwapi.IoBuffer, ...) pwapi.WasmResult + func (f *HostFunctions) SetEffectiveContextID(contextID int32) pwapi.WasmResult + func (f *HostFunctions) SetProperty(key, value string) pwapi.WasmResult + func (f *HostFunctions) SetTickPeriodMilliseconds(tickPeriodMilliseconds int32) pwapi.WasmResult + type HostFunctionsOption func(hf *HostFunctions) + func SetHostFunctionsLogger(logger logr.Logger) HostFunctionsOption + func SetHostFunctionsMetricHandler(h api.MetricHandler) HostFunctionsOption + type MetricType int32 + const MetricTypeCounter + const MetricTypeGauge + const MetricTypeHistogram + const MetricTypeMax + type ParsedMetric struct + Name string + Values map[string]string + func ParseEnvoyStatTag(tag string) ParsedMetric + type VMKey string