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 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) 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 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 ¶ added in v0.20.0
func ProxyOnConfigure(pluginContextID uint32, vmConfigurationSize int) types.OnPluginStartStatus
func ProxyOnContextCreate ¶ added in v0.20.0
func ProxyOnDelete ¶ added in v0.20.0
func ProxyOnDelete(contextID uint32)
func ProxyOnDone ¶ added in v0.20.0
func ProxyOnDownstreamConnectionClose ¶ added in v0.20.0
func ProxyOnDownstreamData ¶ added in v0.20.0
func ProxyOnHttpCallResponse ¶ added in v0.20.0
func ProxyOnLog ¶ added in v0.20.0
func ProxyOnLog(pluginContextID uint32)
func ProxyOnNewConnection ¶ added in v0.20.0
func ProxyOnQueueReady ¶ added in v0.20.0
func ProxyOnQueueReady(contextID, queueID uint32)
func ProxyOnRequestBody ¶ added in v0.20.0
func ProxyOnRequestHeaders ¶ added in v0.20.0
func ProxyOnRequestTrailers ¶ added in v0.20.0
func ProxyOnResponseBody ¶ added in v0.20.0
func ProxyOnResponseHeaders ¶ added in v0.20.0
func ProxyOnResponseTrailers ¶ added in v0.20.0
func ProxyOnTick ¶ added in v0.20.0
func ProxyOnTick(pluginContextID uint32)
func ProxyOnUpstreamConnectionClose ¶ added in v0.20.0
func ProxyOnUpstreamData ¶ added in v0.20.0
func ProxyOnVMStart ¶ added in v0.20.0
func ProxyOnVMStart(pluginContextID uint32, vmConfigurationSize int) types.OnVMStartStatus
func RawBytePtrToByteSlice ¶
func RawBytePtrToString ¶
func RegisterHttpCallout ¶
func RegisterMockWasmHost ¶ added in v0.20.0
func RegisterMockWasmHost(host ProxyWasmHost) (release func())
func SerializeMap ¶
func SerializePropertyPath ¶
func SetVMContext ¶ added in v0.13.0
func StatusToError ¶
func StringBytePtr ¶
func VMStateGetActiveContextID ¶ added in v0.20.0
func VMStateGetActiveContextID() uint32
func VMStateReset ¶ added in v0.20.0
func VMStateReset()
func VMStateSetActiveContextID ¶ added in v0.20.0
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 )
type DefaultProxyWAMSHost ¶ added in v0.20.0
type DefaultProxyWAMSHost struct{}
func (DefaultProxyWAMSHost) ProxyAddHeaderMapValue ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxyCallForeignFunction ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxyCloseStream ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyCloseStream(streamType StreamType) Status
func (DefaultProxyWAMSHost) ProxyContinueStream ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyContinueStream(streamType StreamType) Status
func (DefaultProxyWAMSHost) ProxyDefineMetric ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyDefineMetric(metricType MetricType, metricNameData *byte, metricNameSize int, returnMetricIDPtr *uint32) Status
func (DefaultProxyWAMSHost) ProxyDequeueSharedQueue ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyDequeueSharedQueue(queueID uint32, returnValueData **byte, returnValueSize *int) Status
func (DefaultProxyWAMSHost) ProxyDone ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyDone() Status
func (DefaultProxyWAMSHost) ProxyEnqueueSharedQueue ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyEnqueueSharedQueue(queueID uint32, valueData *byte, valueSize int) Status
func (DefaultProxyWAMSHost) ProxyGetBufferBytes ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyGetBufferBytes(bufferType BufferType, start int, maxSize int, returnBufferData **byte, returnBufferSize *int) Status
func (DefaultProxyWAMSHost) ProxyGetHeaderMapPairs ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyGetHeaderMapPairs(mapType MapType, returnValueData **byte, returnValueSize *int) Status
func (DefaultProxyWAMSHost) ProxyGetHeaderMapValue ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxyGetMetric ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyGetMetric(metricID uint32, returnMetricValue *uint64) Status
func (DefaultProxyWAMSHost) ProxyGetProperty ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxyGetSharedData ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxyHttpCall ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxyIncrementMetric ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyIncrementMetric(metricID uint32, offset int64) Status
func (DefaultProxyWAMSHost) ProxyLog ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyLog(logLevel LogLevel, messageData *byte, messageSize int) Status
func (DefaultProxyWAMSHost) ProxyRecordMetric ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyRecordMetric(metricID uint32, value uint64) Status
func (DefaultProxyWAMSHost) ProxyRegisterSharedQueue ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyRegisterSharedQueue(nameData *byte, nameSize int, returnID *uint32) Status
func (DefaultProxyWAMSHost) ProxyRemoveHeaderMapValue ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxyRemoveHeaderMapValue(mapType MapType, keyData *byte, keySize int) Status
func (DefaultProxyWAMSHost) ProxyReplaceHeaderMapValue ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxyResolveSharedQueue ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxySendLocalResponse ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxySetBufferBytes ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxySetBufferBytes(bufferType BufferType, start int, maxSize int, bufferData *byte, bufferSize int) Status
func (DefaultProxyWAMSHost) ProxySetEffectiveContext ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxySetEffectiveContext(contextID uint32) Status
func (DefaultProxyWAMSHost) ProxySetHeaderMapPairs ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxySetHeaderMapPairs(mapType MapType, mapData *byte, mapSize int) Status
func (DefaultProxyWAMSHost) ProxySetProperty ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxySetSharedData ¶ added in v0.20.0
func (DefaultProxyWAMSHost) ProxySetTickPeriodMilliseconds ¶ added in v0.20.0
func (d DefaultProxyWAMSHost) ProxySetTickPeriodMilliseconds(period uint32) Status
type MetricType ¶
type MetricType uint32
type ProxyWasmHost ¶ added in v0.20.0
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 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 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
- hostcall_utls.go
- serde.go
- timing_off.go
- vmstate.go
- vmstate_test_export.go
Click to show internal directories.
Click to hide internal directories.