internal

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricTypeCounter   = 0
	MetricTypeGauge     = 1
	MetricTypeHistogram = 2
)

Variables

This section is empty.

Functions

func DeserializeMap

func DeserializeMap(bs []byte) [][2]string

func RawBytePtrToByteSlice

func RawBytePtrToByteSlice(raw *byte, size int) []byte

func RawBytePtrToString

func RawBytePtrToString(raw *byte, size int) string

func RegisterHttpCallout

func RegisterHttpCallout(calloutID uint32, callback func(numHeaders, bodySize, numTrailers int))

func SerializeMap

func SerializeMap(ms [][2]string) []byte

func SerializePropertyPath

func SerializePropertyPath(path []string) []byte

func SetVMContext added in v0.13.0

func SetVMContext(vmContext types.VMContext)

func StatusToError

func StatusToError(status Status) error

func StringBytePtr

func StringBytePtr(msg string) *byte

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 LogLevel

type LogLevel uint32
const (
	LogLevelTrace    LogLevel = 0
	LogLevelDebug    LogLevel = 1
	LogLevelInfo     LogLevel = 2
	LogLevelWarn     LogLevel = 3
	LogLevelError    LogLevel = 4
	LogLevelCritical LogLevel = 5
	LogLevelMax      LogLevel = 6
)

func (LogLevel) String

func (l LogLevel) String() string

type MapType

type MapType uint32
const (
	MapTypeHttpRequestHeaders       MapType = 0
	MapTypeHttpRequestTrailers      MapType = 1
	MapTypeHttpResponseHeaders      MapType = 2
	MapTypeHttpResponseTrailers     MapType = 3
	MapTypeHttpCallResponseHeaders  MapType = 6
	MapTypeHttpCallResponseTrailers MapType = 7
)

type MetricType

type MetricType uint32

type Status

type Status uint32
const (
	StatusOK              Status = 0
	StatusNotFound        Status = 1
	StatusBadArgument     Status = 2
	StatusEmpty           Status = 7
	StatusCasMismatch     Status = 8
	StatusInternalFailure Status = 10
)

func ProxyAddHeaderMapValue

func ProxyAddHeaderMapValue(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status

func ProxyCallForeignFunction

func ProxyCallForeignFunction(funcNamePtr *byte, funcNameSize int, paramPtr *byte, paramSize int, returnData **byte, returnSize *int) Status

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 ProxyDequeueSharedQueue(queueID uint32, returnValueData **byte, returnValueSize *int) Status

func ProxyDone

func ProxyDone() Status

func ProxyEnqueueSharedQueue

func ProxyEnqueueSharedQueue(queueID uint32, valueData *byte, valueSize int) Status

func ProxyGetBufferBytes

func ProxyGetBufferBytes(bufferType BufferType, start int, maxSize int, returnBufferData **byte, returnBufferSize *int) Status

func ProxyGetHeaderMapPairs

func ProxyGetHeaderMapPairs(mapType MapType, returnValueData **byte, returnValueSize *int) Status

func ProxyGetHeaderMapValue

func ProxyGetHeaderMapValue(mapType MapType, keyData *byte, keySize int, returnValueData **byte, returnValueSize *int) Status

func ProxyGetMetric

func ProxyGetMetric(metricID uint32, returnMetricValue *uint64) Status

func ProxyGetProperty

func ProxyGetProperty(pathData *byte, pathSize int, returnValueData **byte, returnValueSize *int) Status

func ProxyGetSharedData

func ProxyGetSharedData(keyData *byte, keySize int, returnValueData **byte, returnValueSize *int, returnCas *uint32) Status

func ProxyHttpCall

func ProxyHttpCall(upstreamData *byte, upstreamSize int, headerData *byte, headerSize int,
	bodyData *byte, bodySize int, trailersData *byte, trailersSize int, timeout uint32, calloutIDPtr *uint32,
) Status

func ProxyIncrementMetric

func ProxyIncrementMetric(metricID uint32, offset int64) Status

func ProxyLog

func ProxyLog(logLevel LogLevel, messageData *byte, messageSize int) Status

func ProxyRecordMetric

func ProxyRecordMetric(metricID uint32, value uint64) Status

func ProxyRegisterSharedQueue

func ProxyRegisterSharedQueue(nameData *byte, nameSize int, returnID *uint32) Status

func ProxyRemoveHeaderMapValue

func ProxyRemoveHeaderMapValue(mapType MapType, keyData *byte, keySize int) Status

func ProxyReplaceHeaderMapValue

func ProxyReplaceHeaderMapValue(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status

func ProxyResolveSharedQueue

func ProxyResolveSharedQueue(vmIDData *byte, vmIDSize int, nameData *byte, nameSize int, returnID *uint32) Status

func ProxySendLocalResponse

func ProxySendLocalResponse(statusCode uint32, statusCodeDetailData *byte, statusCodeDetailsSize int,
	bodyData *byte, bodySize int, headersData *byte, headersSize int, grpcStatus int32) Status

func ProxySetBufferBytes

func ProxySetBufferBytes(bufferType BufferType, start int, maxSize int, bufferData *byte, bufferSize int) Status

func ProxySetEffectiveContext

func ProxySetEffectiveContext(contextID uint32) Status

func ProxySetHeaderMapPairs

func ProxySetHeaderMapPairs(mapType MapType, mapData *byte, mapSize int) Status

func ProxySetProperty

func ProxySetProperty(pathData *byte, pathSize int, valueData *byte, valueSize int) Status

func ProxySetSharedData

func ProxySetSharedData(keyData *byte, keySize int, valueData *byte, valueSize int, cas uint32) Status

func ProxySetTickPeriodMilliseconds

func ProxySetTickPeriodMilliseconds(period uint32) Status

type StreamType

type StreamType uint32
const (
	StreamTypeRequest    StreamType = 0
	StreamTypeResponse   StreamType = 1
	StreamTypeDownstream StreamType = 2
	StreamTypeUpstream   StreamType = 3
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL