Documentation ¶
Index ¶
- Constants
- 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
- type DefaultProxyWAMSHost
- 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
- type MapType
- type MetricType
- type ProxyWasmHost
- type Status
- 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
Constants ¶
View Source
const ( MetricTypeCounter = 0 MetricTypeGauge = 1 MetricTypeHistogram = 2 )
Variables ¶
This section is empty.
Functions ¶
func DeserializeMap ¶
func ProxyOnConfigure ¶
func ProxyOnConfigure(pluginContextID uint32, vmConfigurationSize int) types.OnPluginStartStatus
func ProxyOnContextCreate ¶
func ProxyOnDelete ¶
func ProxyOnDelete(contextID uint32)
func ProxyOnDone ¶
func ProxyOnDownstreamData ¶
func ProxyOnHttpCallResponse ¶
func ProxyOnLog ¶
func ProxyOnLog(pluginContextID uint32)
func ProxyOnNewConnection ¶
func ProxyOnQueueReady ¶
func ProxyOnQueueReady(contextID, queueID uint32)
func ProxyOnRequestBody ¶
func ProxyOnRequestHeaders ¶
func ProxyOnRequestTrailers ¶
func ProxyOnResponseBody ¶
func ProxyOnResponseHeaders ¶
func ProxyOnResponseTrailers ¶
func ProxyOnTick ¶
func ProxyOnTick(pluginContextID uint32)
func ProxyOnUpstreamData ¶
func ProxyOnVMStart ¶
func ProxyOnVMStart(pluginContextID uint32, vmConfigurationSize int) types.OnVMStartStatus
func RawBytePtrToByteSlice ¶
func RawBytePtrToString ¶
func RegisterHttpCallout ¶
func RegisterMockWasmHost ¶
func RegisterMockWasmHost(host ProxyWasmHost) (release func())
func RegisterRedisCallout ¶
func SerializeMap ¶
func SerializePropertyPath ¶
func SetVMContext ¶
func StatusToError ¶
func StringBytePtr ¶
func VMStateGetActiveContextID ¶
func VMStateGetActiveContextID() uint32
func VMStateReset ¶
func VMStateReset()
func VMStateSetActiveContextID ¶
func VMStateSetActiveContextID(contextID uint32)
Types ¶
type BufferType ¶
type BufferType uint32
const ( BufferTypeHttpRequestBody BufferType = 0 BufferTypeHttpResponseBody BufferType = 1 BufferTypeDownstreamData BufferType = 2 BufferTypeUpstreamData BufferType = 3 BufferTypeHttpCallResponseBody BufferType = 4 BufferTypeGrpcReceiveBuffer BufferType = 5 BufferTypeVMConfiguration BufferType = 6 BufferTypePluginConfiguration BufferType = 7 BufferTypeCallData BufferType = 8 BufferTypeRedisCallResponse BufferType = 9 )
type DefaultProxyWAMSHost ¶
type DefaultProxyWAMSHost struct{}
func (DefaultProxyWAMSHost) ProxyAddHeaderMapValue ¶
func (DefaultProxyWAMSHost) ProxyCallForeignFunction ¶
func (DefaultProxyWAMSHost) ProxyCloseStream ¶
func (d DefaultProxyWAMSHost) ProxyCloseStream(streamType StreamType) Status
func (DefaultProxyWAMSHost) ProxyContinueStream ¶
func (d DefaultProxyWAMSHost) ProxyContinueStream(streamType StreamType) Status
func (DefaultProxyWAMSHost) ProxyDefineMetric ¶
func (d DefaultProxyWAMSHost) ProxyDefineMetric(metricType MetricType, metricNameData *byte, metricNameSize int, returnMetricIDPtr *uint32) Status
func (DefaultProxyWAMSHost) ProxyDequeueSharedQueue ¶
func (d DefaultProxyWAMSHost) ProxyDequeueSharedQueue(queueID uint32, returnValueData **byte, returnValueSize *int) Status
func (DefaultProxyWAMSHost) ProxyDone ¶
func (d DefaultProxyWAMSHost) ProxyDone() Status
func (DefaultProxyWAMSHost) ProxyEnqueueSharedQueue ¶
func (d DefaultProxyWAMSHost) ProxyEnqueueSharedQueue(queueID uint32, valueData *byte, valueSize int) Status
func (DefaultProxyWAMSHost) ProxyGetBufferBytes ¶
func (d DefaultProxyWAMSHost) ProxyGetBufferBytes(bufferType BufferType, start int, maxSize int, returnBufferData **byte, returnBufferSize *int) Status
func (DefaultProxyWAMSHost) ProxyGetHeaderMapPairs ¶
func (d DefaultProxyWAMSHost) ProxyGetHeaderMapPairs(mapType MapType, returnValueData **byte, returnValueSize *int) Status
func (DefaultProxyWAMSHost) ProxyGetHeaderMapValue ¶
func (DefaultProxyWAMSHost) ProxyGetMetric ¶
func (d DefaultProxyWAMSHost) ProxyGetMetric(metricID uint32, returnMetricValue *uint64) Status
func (DefaultProxyWAMSHost) ProxyGetProperty ¶
func (DefaultProxyWAMSHost) ProxyGetSharedData ¶
func (DefaultProxyWAMSHost) ProxyHttpCall ¶
func (DefaultProxyWAMSHost) ProxyIncrementMetric ¶
func (d DefaultProxyWAMSHost) ProxyIncrementMetric(metricID uint32, offset int64) Status
func (DefaultProxyWAMSHost) ProxyLog ¶
func (d DefaultProxyWAMSHost) ProxyLog(logLevel LogLevel, messageData *byte, messageSize int) Status
func (DefaultProxyWAMSHost) ProxyRecordMetric ¶
func (d DefaultProxyWAMSHost) ProxyRecordMetric(metricID uint32, value uint64) Status
func (DefaultProxyWAMSHost) ProxyRedisCall ¶
func (DefaultProxyWAMSHost) ProxyRedisInit ¶
func (DefaultProxyWAMSHost) ProxyRegisterSharedQueue ¶
func (d DefaultProxyWAMSHost) ProxyRegisterSharedQueue(nameData *byte, nameSize int, returnID *uint32) Status
func (DefaultProxyWAMSHost) ProxyRemoveHeaderMapValue ¶
func (d DefaultProxyWAMSHost) ProxyRemoveHeaderMapValue(mapType MapType, keyData *byte, keySize int) Status
func (DefaultProxyWAMSHost) ProxyReplaceHeaderMapValue ¶
func (DefaultProxyWAMSHost) ProxyResolveSharedQueue ¶
func (DefaultProxyWAMSHost) ProxySendLocalResponse ¶
func (DefaultProxyWAMSHost) ProxySetBufferBytes ¶
func (d DefaultProxyWAMSHost) ProxySetBufferBytes(bufferType BufferType, start int, maxSize int, bufferData *byte, bufferSize int) Status
func (DefaultProxyWAMSHost) ProxySetEffectiveContext ¶
func (d DefaultProxyWAMSHost) ProxySetEffectiveContext(contextID uint32) Status
func (DefaultProxyWAMSHost) ProxySetHeaderMapPairs ¶
func (d DefaultProxyWAMSHost) ProxySetHeaderMapPairs(mapType MapType, mapData *byte, mapSize int) Status
func (DefaultProxyWAMSHost) ProxySetProperty ¶
func (DefaultProxyWAMSHost) ProxySetSharedData ¶
func (DefaultProxyWAMSHost) ProxySetTickPeriodMilliseconds ¶
func (d DefaultProxyWAMSHost) ProxySetTickPeriodMilliseconds(period uint32) Status
type MetricType ¶
type MetricType uint32
type ProxyWasmHost ¶
type ProxyWasmHost interface { ProxyLog(logLevel LogLevel, messageData *byte, messageSize int) Status ProxySetProperty(pathData *byte, pathSize int, valueData *byte, valueSize int) Status ProxyGetProperty(pathData *byte, pathSize int, returnValueData **byte, returnValueSize *int) Status ProxySendLocalResponse(statusCode uint32, statusCodeDetailData *byte, statusCodeDetailsSize int, bodyData *byte, bodySize int, headersData *byte, headersSize int, grpcStatus int32) Status ProxyGetHeaderMapValue(mapType MapType, keyData *byte, keySize int, returnValueData **byte, returnValueSize *int) Status ProxyAddHeaderMapValue(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status ProxyReplaceHeaderMapValue(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status ProxyContinueStream(streamType StreamType) Status ProxyCloseStream(streamType StreamType) Status ProxyRemoveHeaderMapValue(mapType MapType, keyData *byte, keySize int) Status ProxyGetHeaderMapPairs(mapType MapType, returnValueData **byte, returnValueSize *int) Status ProxySetHeaderMapPairs(mapType MapType, mapData *byte, mapSize int) Status ProxyGetBufferBytes(bufferType BufferType, start int, maxSize int, returnBufferData **byte, returnBufferSize *int) Status ProxySetBufferBytes(bufferType BufferType, start int, maxSize int, bufferData *byte, bufferSize int) Status ProxyHttpCall(upstreamData *byte, upstreamSize int, headerData *byte, headerSize int, bodyData *byte, bodySize int, trailersData *byte, trailersSize int, timeout uint32, calloutIDPtr *uint32) Status ProxyRedisInit(upstreamData *byte, upstreamSize int, usernameData *byte, usernameSize int, passwordData *byte, passwordSize int, timeout uint32) Status ProxyRedisCall(upstreamData *byte, upstreamSize int, queryData *byte, querySize int, calloutIDPtr *uint32) Status ProxyCallForeignFunction(funcNamePtr *byte, funcNameSize int, paramPtr *byte, paramSize int, returnData **byte, returnSize *int) Status ProxySetTickPeriodMilliseconds(period uint32) Status ProxySetEffectiveContext(contextID uint32) Status ProxyDone() Status ProxyDefineMetric(metricType MetricType, metricNameData *byte, metricNameSize int, returnMetricIDPtr *uint32) Status ProxyIncrementMetric(metricID uint32, offset int64) Status ProxyRecordMetric(metricID uint32, value uint64) Status ProxyGetMetric(metricID uint32, returnMetricValue *uint64) Status }
type Status ¶
type Status uint32
func ProxyAddHeaderMapValue ¶
func ProxyCloseStream ¶
func ProxyCloseStream(streamType StreamType) Status
func ProxyContinueStream ¶
func ProxyContinueStream(streamType StreamType) Status
func ProxyDefineMetric ¶
func ProxyDefineMetric(metricType MetricType, metricNameData *byte, metricNameSize int, returnMetricIDPtr *uint32) Status
func ProxyDequeueSharedQueue ¶
func ProxyEnqueueSharedQueue ¶
func ProxyGetBufferBytes ¶
func ProxyGetHeaderMapPairs ¶
func ProxyGetHeaderMapValue ¶
func ProxyGetMetric ¶
func ProxyGetProperty ¶
func ProxyGetSharedData ¶
func ProxyHttpCall ¶
func ProxyIncrementMetric ¶
func ProxyRecordMetric ¶
func ProxyRedisCall ¶
func ProxyRedisInit ¶
func ProxyResolveSharedQueue ¶
func ProxySendLocalResponse ¶
func ProxySetBufferBytes ¶
func ProxySetHeaderMapPairs ¶
func ProxySetProperty ¶
func ProxySetSharedData ¶
type StreamType ¶
type StreamType uint32
const ( StreamTypeRequest StreamType = 0 StreamTypeResponse StreamType = 1 StreamTypeDownstream StreamType = 2 StreamTypeUpstream StreamType = 3 )
Source Files ¶
- abi_callback_alloc.go
- abi_callback_configuration.go
- abi_callback_l4.go
- abi_callback_l7.go
- abi_callback_lifecycle.go
- abi_callback_queue.go
- abi_callback_test_export.go
- abi_callback_timers.go
- abi_callback_version.go
- abi_enums.go
- abi_hostcalls_mock.go
- hostcall_utils_go.go
- hostcall_utls.go
- serde.go
- timing_off.go
- vmstate.go
- vmstate_test_export.go
Click to show internal directories.
Click to hide internal directories.