Versions in this module Expand all Collapse all v1 v1.0.0 Nov 5, 2024 Changes in this version + const MetricTypeCounter + const MetricTypeGauge + const MetricTypeHistogram + func DeserializeMap(bs []byte) [][2]string + func ProxyOnConfigure(pluginContextID uint32, vmConfigurationSize int) types.OnPluginStartStatus + func ProxyOnContextCreate(contextID uint32, pluginContextID uint32) + func ProxyOnDelete(contextID uint32) + func ProxyOnDone(contextID uint32) bool + func ProxyOnDownstreamConnectionClose(contextID uint32, pType types.PeerType) + func ProxyOnDownstreamData(contextID uint32, dataSize int, endOfStream bool) types.Action + func ProxyOnHttpCallResponse(pluginContextID, calloutID uint32, numHeaders, bodySize, numTrailers int) + func ProxyOnLog(pluginContextID uint32) + func ProxyOnNewConnection(contextID uint32) types.Action + func ProxyOnQueueReady(contextID, queueID uint32) + func ProxyOnRequestBody(contextID uint32, bodySize int, endOfStream bool) types.Action + func ProxyOnRequestHeaders(contextID uint32, numHeaders int, endOfStream bool) types.Action + func ProxyOnRequestTrailers(contextID uint32, numTrailers int) types.Action + func ProxyOnResponseBody(contextID uint32, bodySize int, endOfStream bool) types.Action + func ProxyOnResponseHeaders(contextID uint32, numHeaders int, endOfStream bool) types.Action + func ProxyOnResponseTrailers(contextID uint32, numTrailers int) types.Action + func ProxyOnTick(pluginContextID uint32) + func ProxyOnUpstreamConnectionClose(contextID uint32, pType types.PeerType) + func ProxyOnUpstreamData(contextID uint32, dataSize int, endOfStream bool) types.Action + func ProxyOnVMStart(pluginContextID uint32, vmConfigurationSize int) types.OnVMStartStatus + func RawBytePtrToByteSlice(raw *byte, size int) []byte + func RawBytePtrToString(raw *byte, size int) string + func RegisterHttpCallout(calloutID uint32, callback func(numHeaders, bodySize, numTrailers int)) + func RegisterMockWasmHost(host ProxyWasmHost) (release func()) + func RegisterRedisCallout(calloutID uint32, callback func(status, responseSize int)) + func SerializeMap(ms [][2]string) []byte + func SerializePropertyPath(path []string) []byte + func SetVMContext(vmContext types.VMContext) + func StatusToError(status Status) error + func StringBytePtr(msg string) *byte + func VMStateGetActiveContextID() uint32 + func VMStateReset() + func VMStateSetActiveContextID(contextID uint32) + type BufferType uint32 + const BufferTypeCallData + const BufferTypeDownstreamData + const BufferTypeGrpcReceiveBuffer + const BufferTypeHttpCallResponseBody + const BufferTypeHttpRequestBody + const BufferTypeHttpResponseBody + const BufferTypePluginConfiguration + const BufferTypeRedisCallResponse + const BufferTypeUpstreamData + const BufferTypeVMConfiguration + type DefaultProxyWAMSHost struct + func (d DefaultProxyWAMSHost) ProxyAddHeaderMapValue(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status + func (d DefaultProxyWAMSHost) ProxyCallForeignFunction(funcNamePtr *byte, funcNameSize int, paramPtr *byte, paramSize int, ...) Status + func (d DefaultProxyWAMSHost) ProxyCloseStream(streamType StreamType) Status + func (d DefaultProxyWAMSHost) ProxyContinueStream(streamType StreamType) Status + func (d DefaultProxyWAMSHost) ProxyDefineMetric(metricType MetricType, metricNameData *byte, metricNameSize int, ...) Status + func (d DefaultProxyWAMSHost) ProxyDequeueSharedQueue(queueID uint32, returnValueData **byte, returnValueSize *int) Status + func (d DefaultProxyWAMSHost) ProxyDone() Status + func (d DefaultProxyWAMSHost) ProxyEnqueueSharedQueue(queueID uint32, valueData *byte, valueSize int) Status + func (d DefaultProxyWAMSHost) ProxyGetBufferBytes(bufferType BufferType, start int, maxSize int, returnBufferData **byte, ...) Status + func (d DefaultProxyWAMSHost) ProxyGetHeaderMapPairs(mapType MapType, returnValueData **byte, returnValueSize *int) Status + func (d DefaultProxyWAMSHost) ProxyGetHeaderMapValue(mapType MapType, keyData *byte, keySize int, returnValueData **byte, ...) Status + func (d DefaultProxyWAMSHost) ProxyGetMetric(metricID uint32, returnMetricValue *uint64) Status + func (d DefaultProxyWAMSHost) ProxyGetProperty(pathData *byte, pathSize int, returnValueData **byte, returnValueSize *int) Status + func (d DefaultProxyWAMSHost) ProxyGetSharedData(keyData *byte, keySize int, returnValueData **byte, returnValueSize *int, ...) Status + func (d DefaultProxyWAMSHost) ProxyHttpCall(upstreamData *byte, upstreamSize int, headerData *byte, headerSize int, ...) Status + func (d DefaultProxyWAMSHost) ProxyIncrementMetric(metricID uint32, offset int64) Status + func (d DefaultProxyWAMSHost) ProxyLog(logLevel LogLevel, messageData *byte, messageSize int) Status + func (d DefaultProxyWAMSHost) ProxyRecordMetric(metricID uint32, value uint64) Status + func (d DefaultProxyWAMSHost) ProxyRedisCall(upstreamData *byte, upstreamSize int, queryData *byte, querySize int, ...) Status + func (d DefaultProxyWAMSHost) ProxyRedisInit(upstreamData *byte, upstreamSize int, usernameData *byte, usernameSize int, ...) Status + func (d DefaultProxyWAMSHost) ProxyRegisterSharedQueue(nameData *byte, nameSize int, returnID *uint32) Status + func (d DefaultProxyWAMSHost) ProxyRemoveHeaderMapValue(mapType MapType, keyData *byte, keySize int) Status + func (d DefaultProxyWAMSHost) ProxyReplaceHeaderMapValue(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status + func (d DefaultProxyWAMSHost) ProxyResolveSharedQueue(vmIDData *byte, vmIDSize int, nameData *byte, nameSize int, returnID *uint32) Status + func (d DefaultProxyWAMSHost) ProxySendLocalResponse(statusCode uint32, statusCodeDetailData *byte, statusCodeDetailsSize int, ...) Status + func (d DefaultProxyWAMSHost) ProxySetBufferBytes(bufferType BufferType, start int, maxSize int, bufferData *byte, ...) Status + func (d DefaultProxyWAMSHost) ProxySetEffectiveContext(contextID uint32) Status + func (d DefaultProxyWAMSHost) ProxySetHeaderMapPairs(mapType MapType, mapData *byte, mapSize int) Status + func (d DefaultProxyWAMSHost) ProxySetProperty(pathData *byte, pathSize int, valueData *byte, valueSize int) Status + func (d DefaultProxyWAMSHost) ProxySetSharedData(keyData *byte, keySize int, valueData *byte, valueSize int, cas uint32) Status + func (d DefaultProxyWAMSHost) ProxySetTickPeriodMilliseconds(period uint32) Status + type LogLevel uint32 + const LogLevelCritical + const LogLevelDebug + const LogLevelError + const LogLevelInfo + const LogLevelMax + const LogLevelTrace + const LogLevelWarn + func (l LogLevel) String() string + type MapType uint32 + const MapTypeHttpCallResponseHeaders + const MapTypeHttpCallResponseTrailers + const MapTypeHttpRequestHeaders + const MapTypeHttpRequestTrailers + const MapTypeHttpResponseHeaders + const MapTypeHttpResponseTrailers + type MetricType uint32 + type ProxyWasmHost interface + ProxyAddHeaderMapValue func(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status + ProxyCallForeignFunction func(funcNamePtr *byte, funcNameSize int, paramPtr *byte, paramSize int, ...) Status + ProxyCloseStream func(streamType StreamType) Status + ProxyContinueStream func(streamType StreamType) Status + ProxyDefineMetric func(metricType MetricType, metricNameData *byte, metricNameSize int, ...) Status + ProxyDequeueSharedQueue func(queueID uint32, returnValueData **byte, returnValueSize *int) Status + ProxyDone func() Status + ProxyEnqueueSharedQueue func(queueID uint32, valueData *byte, valueSize int) Status + ProxyGetBufferBytes func(bufferType BufferType, start int, maxSize int, returnBufferData **byte, ...) Status + ProxyGetHeaderMapPairs func(mapType MapType, returnValueData **byte, returnValueSize *int) Status + ProxyGetHeaderMapValue func(mapType MapType, keyData *byte, keySize int, returnValueData **byte, ...) Status + ProxyGetMetric func(metricID uint32, returnMetricValue *uint64) Status + ProxyGetProperty func(pathData *byte, pathSize int, returnValueData **byte, returnValueSize *int) Status + ProxyGetSharedData func(keyData *byte, keySize int, returnValueData **byte, returnValueSize *int, ...) Status + ProxyHttpCall func(upstreamData *byte, upstreamSize int, headerData *byte, headerSize int, ...) Status + ProxyIncrementMetric func(metricID uint32, offset int64) Status + ProxyLog func(logLevel LogLevel, messageData *byte, messageSize int) Status + ProxyRecordMetric func(metricID uint32, value uint64) Status + ProxyRedisCall func(upstreamData *byte, upstreamSize int, queryData *byte, querySize int, ...) Status + ProxyRedisInit func(upstreamData *byte, upstreamSize int, usernameData *byte, usernameSize int, ...) Status + ProxyRegisterSharedQueue func(nameData *byte, nameSize int, returnID *uint32) Status + ProxyRemoveHeaderMapValue func(mapType MapType, keyData *byte, keySize int) Status + ProxyReplaceHeaderMapValue func(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status + ProxyResolveSharedQueue func(vmIDData *byte, vmIDSize int, nameData *byte, nameSize int, returnID *uint32) Status + ProxySendLocalResponse func(statusCode uint32, statusCodeDetailData *byte, statusCodeDetailsSize int, ...) Status + ProxySetBufferBytes func(bufferType BufferType, start int, maxSize int, bufferData *byte, ...) Status + ProxySetEffectiveContext func(contextID uint32) Status + ProxySetHeaderMapPairs func(mapType MapType, mapData *byte, mapSize int) Status + ProxySetProperty func(pathData *byte, pathSize int, valueData *byte, valueSize int) Status + ProxySetSharedData func(keyData *byte, keySize int, valueData *byte, valueSize int, cas uint32) Status + ProxySetTickPeriodMilliseconds func(period uint32) Status + type Status uint32 + const StatusBadArgument + const StatusCasMismatch + const StatusEmpty + const StatusInternalFailure + const StatusNotFound + const StatusOK + const StatusUnimplemented + func ProxyAddHeaderMapValue(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status + func ProxyCallForeignFunction(funcNamePtr *byte, funcNameSize int, paramPtr *byte, paramSize int, ...) Status + func ProxyCloseStream(streamType StreamType) Status + func ProxyContinueStream(streamType StreamType) Status + func ProxyDefineMetric(metricType MetricType, metricNameData *byte, metricNameSize int, ...) Status + func ProxyDequeueSharedQueue(queueID uint32, returnValueData **byte, returnValueSize *int) Status + func ProxyDone() Status + func ProxyEnqueueSharedQueue(queueID uint32, valueData *byte, valueSize int) Status + func ProxyGetBufferBytes(bufferType BufferType, start int, maxSize int, returnBufferData **byte, ...) Status + func ProxyGetHeaderMapPairs(mapType MapType, returnValueData **byte, returnValueSize *int) Status + func ProxyGetHeaderMapValue(mapType MapType, keyData *byte, keySize int, returnValueData **byte, ...) Status + func ProxyGetMetric(metricID uint32, returnMetricValue *uint64) Status + func ProxyGetProperty(pathData *byte, pathSize int, returnValueData **byte, returnValueSize *int) Status + func ProxyGetSharedData(keyData *byte, keySize int, returnValueData **byte, returnValueSize *int, ...) Status + func ProxyHttpCall(upstreamData *byte, upstreamSize int, headerData *byte, headerSize int, ...) Status + func ProxyIncrementMetric(metricID uint32, offset int64) Status + func ProxyLog(logLevel LogLevel, messageData *byte, messageSize int) Status + func ProxyRecordMetric(metricID uint32, value uint64) Status + func ProxyRedisCall(upstreamData *byte, upstreamSize int, queryData *byte, querySize int, ...) Status + func ProxyRedisInit(upstreamData *byte, upstreamSize int, usernameData *byte, usernameSize int, ...) Status + func ProxyRegisterSharedQueue(nameData *byte, nameSize int, returnID *uint32) Status + func ProxyRemoveHeaderMapValue(mapType MapType, keyData *byte, keySize int) Status + func ProxyReplaceHeaderMapValue(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status + func ProxyResolveSharedQueue(vmIDData *byte, vmIDSize int, nameData *byte, nameSize int, returnID *uint32) Status + func ProxySendLocalResponse(statusCode uint32, statusCodeDetailData *byte, statusCodeDetailsSize int, ...) Status + func ProxySetBufferBytes(bufferType BufferType, start int, maxSize int, bufferData *byte, ...) Status + func ProxySetEffectiveContext(contextID uint32) Status + func ProxySetHeaderMapPairs(mapType MapType, mapData *byte, mapSize int) Status + func ProxySetProperty(pathData *byte, pathSize int, valueData *byte, valueSize int) Status + func ProxySetSharedData(keyData *byte, keySize int, valueData *byte, valueSize int, cas uint32) Status + func ProxySetTickPeriodMilliseconds(period uint32) Status + type StreamType uint32 + const StreamTypeDownstream + const StreamTypeRequest + const StreamTypeResponse + const StreamTypeUpstream