Documentation ¶
Index ¶
- func AddHttpRequestHeader(key, value string) error
- func AddHttpRequestTrailer(key, value string) error
- func AddHttpResponseHeader(key, value string) error
- func AddHttpResponseTrailer(key, value string) error
- func DequeueSharedQueue(queueID uint32) ([]byte, error)
- func DeserializeMap(bs []byte) [][2]string
- func DispatchHttpCall(upstream string, headers [][2]string, body string, trailers [][2]string, ...) (calloutID uint32, err error)
- func EnqueueSharedQueue(queueID uint32, data []byte) error
- func FinishContext()
- func GetCurrentTime() int64
- func GetDownStreamData(start, maxSize int) ([]byte, error)
- func GetHttpCallResponseBody(start, maxSize int) ([]byte, error)
- func GetHttpCallResponseHeaders() ([][2]string, error)
- func GetHttpCallResponseTrailers() ([][2]string, error)
- func GetHttpRequestBody(start, maxSize int) ([]byte, error)
- func GetHttpRequestHeader(key string) (string, error)
- func GetHttpRequestHeaders() ([][2]string, error)
- func GetHttpRequestTrailer(key string) (string, error)
- func GetHttpRequestTrailers() ([][2]string, error)
- func GetHttpResponseBody(start, maxSize int) ([]byte, error)
- func GetHttpResponseHeader(key string) (string, error)
- func GetHttpResponseHeaders() ([][2]string, error)
- func GetHttpResponseTrailer(key string) (string, error)
- func GetHttpResponseTrailers() ([][2]string, error)
- func GetPluginConfiguration(dataSize int) ([]byte, error)
- func GetProperty(path []string) ([]byte, error)
- func GetSharedData(key string) (value []byte, cas uint32, err error)
- func GetUpstreamData(start, maxSize int) ([]byte, error)
- func GetVMConfiguration(dataSize int) ([]byte, error)
- func LogCritical(msg string)
- func LogCriticalf(format string, args ...interface{})
- func LogDebug(msg string)
- func LogDebugf(format string, args ...interface{})
- func LogError(msg string)
- func LogErrorf(format string, args ...interface{})
- func LogInfo(msg string)
- func LogInfof(format string, args ...interface{})
- func LogTrace(msg string)
- func LogTracef(format string, args ...interface{})
- func LogWarn(msg string)
- func LogWarnf(format string, args ...interface{})
- func RawBytePtrToByteSlice(raw *byte, size int) []byte
- func RawBytePtrToString(raw *byte, size int) string
- func RegisterSharedQueue(name string) (uint32, error)
- func RemoveHttpRequestHeader(key string) error
- func RemoveHttpRequestTrailer(key string) error
- func RemoveHttpResponseHeader(key string) error
- func RemoveHttpResponseTrailer(key string) error
- func ResolveSharedQueue(vmID, queueName string) (uint32, error)
- func ResumeHttpRequest() error
- func ResumeHttpResponse() error
- func SendHttpResponse(statusCode uint32, headers [][2]string, body string) types.Status
- func SerializeMap(ms [][2]string) []byte
- func SerializePropertyPath(path []string) []byte
- func SetEffectiveContext(contextID uint32)
- func SetHttpRequestHeader(key, value string) error
- func SetHttpRequestHeaders(headers [][2]string) error
- func SetHttpRequestTrailer(key, value string) error
- func SetHttpRequestTrailers(headers [][2]string) error
- func SetHttpResponseHeader(key, value string) error
- func SetHttpResponseHeaders(headers [][2]string) error
- func SetHttpResponseTrailer(key, value string) error
- func SetHttpResponseTrailers(headers [][2]string) error
- func SetNewHttpContext(f func(contextID uint32) HttpContext)
- func SetNewRootContext(f func(contextID uint32) RootContext)
- func SetNewStreamContext(f func(contextID uint32) StreamContext)
- func SetProperty(path string, data []byte) error
- func SetSharedData(key string, data []byte, cas uint32) error
- func SetTickPeriodMilliSeconds(millSec uint32) error
- type DefaultHttpContext
- func (*DefaultHttpContext) OnHttpRequestBody(int, bool) types.Action
- func (*DefaultHttpContext) OnHttpRequestHeaders(int, bool) types.Action
- func (*DefaultHttpContext) OnHttpRequestTrailers(int) types.Action
- func (*DefaultHttpContext) OnHttpResponseBody(int, bool) types.Action
- func (*DefaultHttpContext) OnHttpResponseHeaders(int, bool) types.Action
- func (*DefaultHttpContext) OnHttpResponseTrailers(int) types.Action
- func (*DefaultHttpContext) OnHttpStreamDone()
- type DefaultRootContext
- type DefaultStreamContext
- func (*DefaultStreamContext) OnDownstreamClose(types.PeerType)
- func (*DefaultStreamContext) OnDownstreamData(int, bool) types.Action
- func (*DefaultStreamContext) OnNewConnection() types.Action
- func (*DefaultStreamContext) OnStreamDone()
- func (*DefaultStreamContext) OnUpstreamClose(types.PeerType)
- func (*DefaultStreamContext) OnUpstreamData(int, bool) types.Action
- type HttpCalloutCallBack
- type HttpContext
- type MetricCounter
- type MetricGauge
- type MetricHistogram
- type RootContext
- type StreamContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHttpRequestHeader ¶ added in v0.0.5
func AddHttpRequestTrailer ¶ added in v0.0.5
func AddHttpResponseHeader ¶ added in v0.0.5
func AddHttpResponseTrailer ¶ added in v0.0.5
func DequeueSharedQueue ¶ added in v0.0.5
func DeserializeMap ¶
func DispatchHttpCall ¶ added in v0.0.5
func EnqueueSharedQueue ¶ added in v0.0.5
func FinishContext ¶ added in v0.0.5
func FinishContext()
func GetCurrentTime ¶ added in v0.0.5
func GetCurrentTime() int64
func GetDownStreamData ¶ added in v0.0.5
func GetHttpCallResponseBody ¶ added in v0.0.5
func GetHttpCallResponseHeaders ¶ added in v0.0.5
func GetHttpCallResponseTrailers ¶ added in v0.0.5
func GetHttpRequestBody ¶ added in v0.0.5
func GetHttpRequestHeader ¶ added in v0.0.5
func GetHttpRequestHeaders ¶ added in v0.0.5
func GetHttpRequestTrailer ¶ added in v0.0.5
func GetHttpRequestTrailers ¶ added in v0.0.5
func GetHttpResponseBody ¶ added in v0.0.5
func GetHttpResponseHeader ¶ added in v0.0.5
func GetHttpResponseHeaders ¶ added in v0.0.5
func GetHttpResponseTrailer ¶ added in v0.0.5
func GetHttpResponseTrailers ¶ added in v0.0.5
func GetPluginConfiguration ¶ added in v0.0.5
func GetProperty ¶ added in v0.0.5
func GetSharedData ¶ added in v0.0.5
func GetUpstreamData ¶ added in v0.0.5
func GetVMConfiguration ¶ added in v0.0.5
func LogCritical ¶
func LogCritical(msg string)
func LogCriticalf ¶ added in v0.0.4
func LogCriticalf(format string, args ...interface{})
func RawBytePtrToByteSlice ¶
func RawBytePtrToString ¶
func RegisterSharedQueue ¶ added in v0.0.5
func RemoveHttpRequestHeader ¶ added in v0.0.5
func RemoveHttpRequestTrailer ¶ added in v0.0.5
func RemoveHttpResponseHeader ¶ added in v0.0.5
func RemoveHttpResponseTrailer ¶ added in v0.0.5
func ResolveSharedQueue ¶ added in v0.0.5
TODO: not sure if the ABI is correct
func ResumeHttpRequest ¶ added in v0.0.5
func ResumeHttpRequest() error
func ResumeHttpResponse ¶ added in v0.0.5
func ResumeHttpResponse() error
func SendHttpResponse ¶ added in v0.0.5
func SerializeMap ¶
func SerializePropertyPath ¶ added in v0.0.3
func SetEffectiveContext ¶ added in v0.0.5
func SetEffectiveContext(contextID uint32)
func SetHttpRequestHeader ¶ added in v0.0.5
func SetHttpRequestHeaders ¶ added in v0.0.5
func SetHttpRequestTrailer ¶ added in v0.0.5
func SetHttpRequestTrailers ¶ added in v0.0.5
func SetHttpResponseHeader ¶ added in v0.0.5
func SetHttpResponseHeaders ¶ added in v0.0.5
func SetHttpResponseTrailer ¶ added in v0.0.5
func SetHttpResponseTrailers ¶ added in v0.0.5
func SetNewHttpContext ¶
func SetNewHttpContext(f func(contextID uint32) HttpContext)
func SetNewRootContext ¶
func SetNewRootContext(f func(contextID uint32) RootContext)
func SetNewStreamContext ¶
func SetNewStreamContext(f func(contextID uint32) StreamContext)
func SetProperty ¶ added in v0.0.5
func SetTickPeriodMilliSeconds ¶ added in v0.0.5
Types ¶
type DefaultHttpContext ¶ added in v0.0.5
type DefaultHttpContext struct{}
func (*DefaultHttpContext) OnHttpRequestBody ¶ added in v0.0.5
func (*DefaultHttpContext) OnHttpRequestBody(int, bool) types.Action
func (*DefaultHttpContext) OnHttpRequestHeaders ¶ added in v0.0.5
func (*DefaultHttpContext) OnHttpRequestHeaders(int, bool) types.Action
impl HttpContext
func (*DefaultHttpContext) OnHttpRequestTrailers ¶ added in v0.0.5
func (*DefaultHttpContext) OnHttpRequestTrailers(int) types.Action
func (*DefaultHttpContext) OnHttpResponseBody ¶ added in v0.0.5
func (*DefaultHttpContext) OnHttpResponseBody(int, bool) types.Action
func (*DefaultHttpContext) OnHttpResponseHeaders ¶ added in v0.0.5
func (*DefaultHttpContext) OnHttpResponseHeaders(int, bool) types.Action
func (*DefaultHttpContext) OnHttpResponseTrailers ¶ added in v0.0.5
func (*DefaultHttpContext) OnHttpResponseTrailers(int) types.Action
func (*DefaultHttpContext) OnHttpStreamDone ¶ added in v0.0.5
func (*DefaultHttpContext) OnHttpStreamDone()
type DefaultRootContext ¶ added in v0.0.5
type DefaultRootContext struct{}
func (*DefaultRootContext) OnPluginStart ¶ added in v0.0.5
func (*DefaultRootContext) OnPluginStart(int) bool
func (*DefaultRootContext) OnQueueReady ¶ added in v0.0.5
func (*DefaultRootContext) OnQueueReady(uint32)
impl RootContext
func (*DefaultRootContext) OnTick ¶ added in v0.0.5
func (*DefaultRootContext) OnTick()
func (*DefaultRootContext) OnVMDone ¶ added in v0.0.5
func (*DefaultRootContext) OnVMDone() bool
func (*DefaultRootContext) OnVMStart ¶ added in v0.0.5
func (*DefaultRootContext) OnVMStart(int) bool
type DefaultStreamContext ¶ added in v0.0.5
type DefaultStreamContext struct{}
func (*DefaultStreamContext) OnDownstreamClose ¶ added in v0.0.5
func (*DefaultStreamContext) OnDownstreamClose(types.PeerType)
func (*DefaultStreamContext) OnDownstreamData ¶ added in v0.0.5
func (*DefaultStreamContext) OnDownstreamData(int, bool) types.Action
impl StreamContext
func (*DefaultStreamContext) OnNewConnection ¶ added in v0.0.5
func (*DefaultStreamContext) OnNewConnection() types.Action
func (*DefaultStreamContext) OnStreamDone ¶ added in v0.0.5
func (*DefaultStreamContext) OnStreamDone()
func (*DefaultStreamContext) OnUpstreamClose ¶ added in v0.0.5
func (*DefaultStreamContext) OnUpstreamClose(types.PeerType)
func (*DefaultStreamContext) OnUpstreamData ¶ added in v0.0.5
func (*DefaultStreamContext) OnUpstreamData(int, bool) types.Action
type HttpCalloutCallBack ¶ added in v0.0.5
type HttpCalloutCallBack = func(numHeaders, bodySize, numTrailers int)
type HttpContext ¶
type HttpContext interface { OnHttpRequestHeaders(numHeaders int, endOfStream bool) types.Action OnHttpRequestBody(bodySize int, endOfStream bool) types.Action OnHttpRequestTrailers(numTrailers int) types.Action OnHttpResponseHeaders(numHeaders int, endOfStream bool) types.Action OnHttpResponseBody(bodySize int, endOfStream bool) types.Action OnHttpResponseTrailers(numTrailers int) types.Action OnHttpStreamDone() }
type MetricCounter ¶
type MetricCounter uint32
func DefineCounterMetric ¶
func DefineCounterMetric(name string) MetricCounter
func (MetricCounter) Get ¶
func (m MetricCounter) Get() uint64
func (MetricCounter) ID ¶
func (m MetricCounter) ID() uint32
func (MetricCounter) Increment ¶
func (m MetricCounter) Increment(offset uint64)
type MetricGauge ¶
type MetricGauge uint32
func DefineGaugeMetric ¶
func DefineGaugeMetric(name string) MetricGauge
func (MetricGauge) Add ¶
func (m MetricGauge) Add(offset int64)
func (MetricGauge) Get ¶
func (m MetricGauge) Get() int64
func (MetricGauge) ID ¶
func (m MetricGauge) ID() uint32
type MetricHistogram ¶
type MetricHistogram uint32
func DefineHistogramMetric ¶
func DefineHistogramMetric(name string) MetricHistogram
func (MetricHistogram) Get ¶
func (m MetricHistogram) Get() uint64
func (MetricHistogram) ID ¶
func (m MetricHistogram) ID() uint32
func (MetricHistogram) Record ¶
func (m MetricHistogram) Record(value uint64)
type RootContext ¶
type StreamContext ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.