Versions in this module Expand all Collapse all v0 v0.2.0 Oct 10, 2022 Changes in this version + const ProxyWasmABI_0_1_0 + func GetBuffer(instance common.WasmInstance, bufferType BufferType) common.IoBuffer + func GetMap(instance common.WasmInstance, mapType MapType) common.HeaderMap + func ProxyAddHeaderMapValue(instance common.WasmInstance, mapType int32, keyDataPtr int32, keySize int32, ...) int32 + func ProxyCallForeignFunction(instance common.WasmInstance, funcNamePtr int32, funcNameSize int32, ...) int32 + func ProxyCancelGrpcCall(instance common.WasmInstance, calloutID int32) int32 + func ProxyCloseGrpcCall(instance common.WasmInstance, calloutID int32) int32 + func ProxyDefineMetric(instance common.WasmInstance, metricType int32, namePtr int32, nameSize int32, ...) int32 + func ProxyDequeueSharedQueue(instance common.WasmInstance, token int32, dataPtr int32, dataSize int32) int32 + func ProxyDone(instance common.WasmInstance) int32 + func ProxyEnqueueSharedQueue(instance common.WasmInstance, token int32, dataPtr int32, dataSize int32) int32 + func ProxyGetBufferBytes(instance common.WasmInstance, bufferType int32, start int32, length int32, ...) int32 + func ProxyGetCurrentTimeNanoseconds(instance common.WasmInstance, resultUint64Ptr int32) int32 + func ProxyGetHeaderMapPairs(instance common.WasmInstance, mapType int32, returnDataPtr int32, ...) int32 + func ProxyGetHeaderMapValue(instance common.WasmInstance, mapType int32, keyDataPtr int32, keySize int32, ...) int32 + func ProxyGetMetric(instance common.WasmInstance, metricId int32, resultUint64Ptr int32) int32 + func ProxyGetProperty(instance common.WasmInstance, keyPtr int32, keySize int32, ...) int32 + func ProxyGetSharedData(instance common.WasmInstance, keyPtr int32, keySize int32, valuePtr int32, ...) int32 + func ProxyGrpcCall(instance common.WasmInstance, grpcServiceData int32, grpcServiceSize int32, ...) int32 + func ProxyHttpCall(instance common.WasmInstance, uriPtr int32, uriSize int32, ...) int32 + func ProxyIncrementMetric(instance common.WasmInstance, metricId int32, offset int64) int32 + func ProxyLog(instance common.WasmInstance, level int32, logDataPtr int32, logDataSize int32) int32 + func ProxyOpenGrpcStream(instance common.WasmInstance, grpcServiceData int32, grpcServiceSize int32, ...) int32 + func ProxyRecordMetric(instance common.WasmInstance, metricId int32, value int64) int32 + func ProxyRegisterSharedQueue(instance common.WasmInstance, queueNamePtr int32, queueNameSize int32, ...) int32 + func ProxyRemoveHeaderMapValue(instance common.WasmInstance, mapType int32, keyDataPtr int32, keySize int32) int32 + func ProxyRemoveMetric(instance common.WasmInstance, metricID int32) int32 + func ProxyRemoveSharedQueue(instance common.WasmInstance, queueID int32) int32 + func ProxyReplaceHeaderMapValue(instance common.WasmInstance, mapType int32, keyDataPtr int32, keySize int32, ...) int32 + func ProxyResolveSharedQueue(instance common.WasmInstance, queueNamePtr int32, queueNameSize int32, ...) int32 + func ProxyResumeDownstream(instance common.WasmInstance) int32 + func ProxyResumeHttpRequest(instance common.WasmInstance) int32 + func ProxyResumeHttpResponse(instance common.WasmInstance) int32 + func ProxyResumeUpstream(instance common.WasmInstance) int32 + func ProxySendGrpcCallMessage(instance common.WasmInstance, calloutID int32, data int32, size int32, ...) int32 + func ProxySendHttpResponse(instance common.WasmInstance, respCode int32, respCodeDetailPtr int32, ...) int32 + func ProxySetBufferBytes(instance common.WasmInstance, bufferType int32, start int32, length int32, ...) int32 + func ProxySetEffectiveContext(instance common.WasmInstance, contextID int32) int32 + func ProxySetHeaderMapPairs(instance common.WasmInstance, mapType int32, ptr int32, size int32) int32 + func ProxySetProperty(instance common.WasmInstance, keyPtr int32, keySize int32, valuePtr int32, ...) int32 + func ProxySetSharedData(instance common.WasmInstance, keyPtr int32, keySize int32, valuePtr int32, ...) int32 + func ProxySetTickPeriodMilliseconds(instance common.WasmInstance, tickPeriodMilliseconds int32) int32 + func RegisterImports(instance common.WasmInstance) + type ABIContext struct + Imports ImportsHandler + Instance common.WasmInstance + func (a *ABIContext) CallWasmFunction(funcName string, args ...interface{}) (interface{}, Action, error) + func (a *ABIContext) GetExports() Exports + func (a *ABIContext) GetImports() ImportsHandler + func (a *ABIContext) GetInstance() common.WasmInstance + func (a *ABIContext) Name() string + func (a *ABIContext) ProxyOnConfigure(rootContextID int32, configurationSize int32) (int32, error) + func (a *ABIContext) ProxyOnContextCreate(contextID int32, parentContextID int32) error + func (a *ABIContext) ProxyOnDelete(contextID int32) error + func (a *ABIContext) ProxyOnDone(contextID int32) (int32, error) + func (a *ABIContext) ProxyOnDownstreamConnectionClose(contextID int32, closeType int32) error + func (a *ABIContext) ProxyOnDownstreamData(contextID int32, dataLength int32, endOfStream int32) (Action, error) + func (a *ABIContext) ProxyOnGrpcCallClose(contextID int32, calloutID int32, statusCode int32) error + func (a *ABIContext) ProxyOnGrpcCallResponseHeaderMetadata(contextID int32, calloutID int32, nElements int32) error + func (a *ABIContext) ProxyOnGrpcCallResponseMessage(contextID int32, calloutID int32, msgSize int32) error + func (a *ABIContext) ProxyOnGrpcCallResponseTrailerMetadata(contextID int32, calloutID int32, nElements int32) error + func (a *ABIContext) ProxyOnHttpCallResponse(contextID int32, token int32, headers int32, bodySize int32, trailers int32) error + func (a *ABIContext) ProxyOnLog(contextID int32) error + func (a *ABIContext) ProxyOnMemoryAllocate(size int32) (int32, error) + func (a *ABIContext) ProxyOnNewConnection(contextID int32) (Action, error) + func (a *ABIContext) ProxyOnQueueReady(rootContextID int32, token int32) error + func (a *ABIContext) ProxyOnRequestBody(contextID int32, bodyBufferLength int32, endOfStream int32) (Action, error) + func (a *ABIContext) ProxyOnRequestHeaders(contextID int32, numHeaders int32, endOfStream int32) (Action, error) + func (a *ABIContext) ProxyOnRequestMetadata(contextID int32, nElements int32) (Action, error) + func (a *ABIContext) ProxyOnRequestTrailers(contextID int32, trailers int32) (Action, error) + func (a *ABIContext) ProxyOnResponseBody(contextID int32, bodyBufferLength int32, endOfStream int32) (Action, error) + func (a *ABIContext) ProxyOnResponseHeaders(contextID int32, headers int32, endOfStream int32) (Action, error) + func (a *ABIContext) ProxyOnResponseMetadata(contextID int32, nElements int32) (Action, error) + func (a *ABIContext) ProxyOnResponseTrailers(contextID int32, trailers int32) (Action, error) + func (a *ABIContext) ProxyOnTick(rootContextID int32) error + func (a *ABIContext) ProxyOnUpstreamConnectionClose(contextID int32, closeType int32) error + func (a *ABIContext) ProxyOnUpstreamData(contextID int32, dataLength int32, endOfStream int32) (Action, error) + func (a *ABIContext) ProxyOnVmStart(rootContextID int32, vmConfigurationSize int32) (int32, error) + func (a *ABIContext) SetImports(imports ImportsHandler) + func (a *ABIContext) SetInstance(instance common.WasmInstance) + type Action int32 + const ActionContinue + const ActionPause + type BufferType int32 + const BufferTypeCallData + const BufferTypeDownstreamData + const BufferTypeGrpcReceiveBuffer + const BufferTypeHttpCallResponseBody + const BufferTypeHttpRequestBody + const BufferTypeHttpResponseBody + const BufferTypePluginConfiguration + const BufferTypeUpstreamData + const BufferTypeVmConfiguration + type ContextHandler interface + GetExports func() Exports + GetImports func() ImportsHandler + GetInstance func() common.WasmInstance + Name func() string + SetImports func(imports ImportsHandler) + SetInstance func(instance common.WasmInstance) + type DefaultImportsHandler struct + func (d *DefaultImportsHandler) CallForeignFunction(funcName string, param []byte) ([]byte, WasmResult) + func (d *DefaultImportsHandler) CancelGrpcCall(token int32) WasmResult + func (d *DefaultImportsHandler) CloseGrpcCall(token int32) WasmResult + func (d *DefaultImportsHandler) DefineMetric(metricType MetricType, name string) (int32, WasmResult) + func (d *DefaultImportsHandler) DequeueSharedQueue(queueID uint32) (string, WasmResult) + func (d *DefaultImportsHandler) Done() WasmResult + func (d *DefaultImportsHandler) EnqueueSharedQueue(queueID uint32, data string) WasmResult + func (d *DefaultImportsHandler) GetCurrentTimeNanoseconds() (int32, WasmResult) + func (d *DefaultImportsHandler) GetCustomBuffer(bufferType BufferType) common.IoBuffer + func (d *DefaultImportsHandler) GetCustomHeader(mapType MapType) common.HeaderMap + func (d *DefaultImportsHandler) GetDownStreamData() common.IoBuffer + func (d *DefaultImportsHandler) GetFuncCallData() common.IoBuffer + func (d *DefaultImportsHandler) GetGrpcReceiveBuffer() common.IoBuffer + func (d *DefaultImportsHandler) GetGrpcReceiveInitialMetaData() common.HeaderMap + func (d *DefaultImportsHandler) GetGrpcReceiveTrailerMetaData() common.HeaderMap + func (d *DefaultImportsHandler) GetHttpCallResponseBody() common.IoBuffer + func (d *DefaultImportsHandler) GetHttpCallResponseHeaders() common.HeaderMap + func (d *DefaultImportsHandler) GetHttpCallResponseTrailer() common.HeaderMap + func (d *DefaultImportsHandler) GetHttpRequestBody() common.IoBuffer + func (d *DefaultImportsHandler) GetHttpRequestHeader() common.HeaderMap + func (d *DefaultImportsHandler) GetHttpRequestTrailer() common.HeaderMap + func (d *DefaultImportsHandler) GetHttpResponseBody() common.IoBuffer + func (d *DefaultImportsHandler) GetHttpResponseHeader() common.HeaderMap + func (d *DefaultImportsHandler) GetHttpResponseTrailer() common.HeaderMap + func (d *DefaultImportsHandler) GetMetric(metricID int32) (int64, WasmResult) + func (d *DefaultImportsHandler) GetPluginConfig() common.IoBuffer + func (d *DefaultImportsHandler) GetProperty(key string) (string, WasmResult) + func (d *DefaultImportsHandler) GetRootContextID() int32 + func (d *DefaultImportsHandler) GetSharedData(key string) (string, uint32, WasmResult) + func (d *DefaultImportsHandler) GetUpstreamData() common.IoBuffer + func (d *DefaultImportsHandler) GetVmConfig() common.IoBuffer + func (d *DefaultImportsHandler) GrpcCall(grpcService string, serviceName string, method string, data common.IoBuffer, ...) (int32, WasmResult) + func (d *DefaultImportsHandler) HttpCall(url string, headers common.HeaderMap, body common.IoBuffer, ...) (int32, WasmResult) + func (d *DefaultImportsHandler) IncrementMetric(metricID int32, offset int64) WasmResult + func (d *DefaultImportsHandler) Log(level LogLevel, msg string) WasmResult + func (d *DefaultImportsHandler) OpenGrpcStream(grpcService string, serviceName string, method string) (int32, WasmResult) + func (d *DefaultImportsHandler) RecordMetric(metricID int32, value int64) WasmResult + func (d *DefaultImportsHandler) RegisterSharedQueue(queueName string) (uint32, WasmResult) + func (d *DefaultImportsHandler) RemoveMetric(metricID int32) WasmResult + func (d *DefaultImportsHandler) RemoveSharedQueue(queueID uint32) WasmResult + func (d *DefaultImportsHandler) ResolveSharedQueue(queueName string) (uint32, WasmResult) + func (d *DefaultImportsHandler) ResumeDownstream() WasmResult + func (d *DefaultImportsHandler) ResumeHttpRequest() WasmResult + func (d *DefaultImportsHandler) ResumeHttpResponse() WasmResult + func (d *DefaultImportsHandler) ResumeUpstream() WasmResult + func (d *DefaultImportsHandler) SendGrpcCallMsg(token int32, data common.IoBuffer, endOfStream int32) WasmResult + func (d *DefaultImportsHandler) SendHttpResp(respCode int32, respCodeDetail common.IoBuffer, respBody common.IoBuffer, ...) WasmResult + func (d *DefaultImportsHandler) SetEffectiveContextID(contextID int32) WasmResult + func (d *DefaultImportsHandler) SetProperty(key string, value string) WasmResult + func (d *DefaultImportsHandler) SetSharedData(key string, value string, cas uint32) WasmResult + func (d *DefaultImportsHandler) SetTickPeriodMilliseconds(tickPeriodMilliseconds int32) WasmResult + func (d *DefaultImportsHandler) Wait() Action + type Exports interface + ProxyOnConfigure func(rootContextID int32, pluginConfigurationSize int32) (int32, error) + ProxyOnContextCreate func(contextID int32, parentContextID int32) error + ProxyOnDelete func(contextID int32) error + ProxyOnDone func(contextID int32) (int32, error) + ProxyOnDownstreamConnectionClose func(contextID int32, closeType int32) error + ProxyOnDownstreamData func(contextID int32, dataLength int32, endOfStream int32) (Action, error) + ProxyOnGrpcCallClose func(contextID int32, calloutID int32, statusCode int32) error + ProxyOnGrpcCallResponseHeaderMetadata func(contextID int32, calloutID int32, nElements int32) error + ProxyOnGrpcCallResponseMessage func(contextID int32, calloutID int32, msgSize int32) error + ProxyOnGrpcCallResponseTrailerMetadata func(contextID int32, calloutID int32, nElements int32) error + ProxyOnHttpCallResponse func(contextID int32, token int32, headers int32, bodySize int32, trailers int32) error + ProxyOnLog func(contextID int32) error + ProxyOnMemoryAllocate func(size int32) (int32, error) + ProxyOnNewConnection func(contextID int32) (Action, error) + ProxyOnQueueReady func(rootContextID int32, token int32) error + ProxyOnRequestBody func(contextID int32, bodyBufferLength int32, endOfStream int32) (Action, error) + ProxyOnRequestHeaders func(contextID int32, headers int32, endOfStream int32) (Action, error) + ProxyOnRequestMetadata func(contextID int32, nElements int32) (Action, error) + ProxyOnRequestTrailers func(contextID int32, trailers int32) (Action, error) + ProxyOnResponseBody func(contextID int32, bodyBufferLength int32, endOfStream int32) (Action, error) + ProxyOnResponseHeaders func(contextID int32, headers int32, endOfStream int32) (Action, error) + ProxyOnResponseMetadata func(contextID int32, nElements int32) (Action, error) + ProxyOnResponseTrailers func(contextID int32, trailers int32) (Action, error) + ProxyOnTick func(rootContextID int32) error + ProxyOnUpstreamConnectionClose func(contextID int32, closeType int32) error + ProxyOnUpstreamData func(contextID int32, dataLength int32, endOfStream int32) (Action, error) + ProxyOnVmStart func(rootContextID int32, vmConfigurationSize int32) (int32, error) + type ImportsHandler interface + CallForeignFunction func(funcName string, param []byte) ([]byte, WasmResult) + CancelGrpcCall func(token int32) WasmResult + CloseGrpcCall func(token int32) WasmResult + DefineMetric func(metricType MetricType, name string) (int32, WasmResult) + DequeueSharedQueue func(queueID uint32) (string, WasmResult) + Done func() WasmResult + EnqueueSharedQueue func(queueID uint32, data string) WasmResult + GetCurrentTimeNanoseconds func() (int32, WasmResult) + GetCustomBuffer func(bufferType BufferType) common.IoBuffer + GetCustomHeader func(mapType MapType) common.HeaderMap + GetDownStreamData func() common.IoBuffer + GetFuncCallData func() common.IoBuffer + GetGrpcReceiveBuffer func() common.IoBuffer + GetGrpcReceiveInitialMetaData func() common.HeaderMap + GetGrpcReceiveTrailerMetaData func() common.HeaderMap + GetHttpCallResponseBody func() common.IoBuffer + GetHttpCallResponseHeaders func() common.HeaderMap + GetHttpCallResponseTrailer func() common.HeaderMap + GetHttpRequestBody func() common.IoBuffer + GetHttpRequestHeader func() common.HeaderMap + GetHttpRequestTrailer func() common.HeaderMap + GetHttpResponseBody func() common.IoBuffer + GetHttpResponseHeader func() common.HeaderMap + GetHttpResponseTrailer func() common.HeaderMap + GetMetric func(metricID int32) (int64, WasmResult) + GetPluginConfig func() common.IoBuffer + GetProperty func(key string) (string, WasmResult) + GetRootContextID func() int32 + GetSharedData func(key string) (string, uint32, WasmResult) + GetUpstreamData func() common.IoBuffer + GetVmConfig func() common.IoBuffer + GrpcCall func(grpcService string, serviceName string, method string, data common.IoBuffer, ...) (int32, WasmResult) + HttpCall func(url string, headers common.HeaderMap, body common.IoBuffer, ...) (int32, WasmResult) + IncrementMetric func(metricID int32, offset int64) WasmResult + Log func(level LogLevel, msg string) WasmResult + OpenGrpcStream func(grpcService string, serviceName string, method string) (int32, WasmResult) + RecordMetric func(metricID int32, value int64) WasmResult + RegisterSharedQueue func(queueName string) (uint32, WasmResult) + RemoveMetric func(metricID int32) WasmResult + RemoveSharedQueue func(queueID uint32) WasmResult + ResolveSharedQueue func(queueName string) (uint32, WasmResult) + ResumeDownstream func() WasmResult + ResumeHttpRequest func() WasmResult + ResumeHttpResponse func() WasmResult + ResumeUpstream func() WasmResult + SendGrpcCallMsg func(token int32, data common.IoBuffer, endOfStream int32) WasmResult + SendHttpResp func(respCode int32, respCodeDetail common.IoBuffer, respBody common.IoBuffer, ...) WasmResult + SetEffectiveContextID func(contextID int32) WasmResult + SetProperty func(key string, value string) WasmResult + SetSharedData func(key string, value string, cas uint32) WasmResult + SetTickPeriodMilliseconds func(tickPeriodMilliseconds int32) WasmResult + Wait func() Action + type LogLevel uint8 + const LogLevelCritical + const LogLevelDebug + const LogLevelError + const LogLevelInfo + const LogLevelTrace + const LogLevelWarn + type MapType int32 + const MapTypeGrpcReceiveInitialMetadata + const MapTypeGrpcReceiveTrailingMetadata + const MapTypeHttpCallResponseHeaders + const MapTypeHttpCallResponseTrailers + const MapTypeHttpRequestHeaders + const MapTypeHttpRequestTrailers + const MapTypeHttpResponseHeaders + const MapTypeHttpResponseTrailers + type MetricType int32 + const MetricTypeCounter + const MetricTypeGauge + const MetricTypeHistogram + const MetricTypeMax + type WasmResult int32 + const WasmResultBadArgument + const WasmResultBadExpression + const WasmResultBrokenConnection + const WasmResultCasMismatch + const WasmResultEmpty + const WasmResultInternalFailure + const WasmResultInvalidMemoryAccess + const WasmResultNotFound + const WasmResultOk + const WasmResultParseFailure + const WasmResultResultMismatch + const WasmResultSerializationFailure + const WasmResultUnimplemented + func (wasmResult WasmResult) Int32() int32