Documentation ¶
Index ¶
- Variables
- 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 AppendDownstreamData(data []byte) error
- func AppendHttpRequestBody(data []byte) error
- func AppendHttpResponseBody(data []byte) error
- func AppendUpstreamData(data []byte) error
- func CallForeignFunction(funcName string, param []byte) (ret []byte, err error)
- func CloseDownstream() error
- func CloseUpstream() error
- func ContinueDownstream() error
- func ContinueUpstream() error
- func DequeueSharedQueue(queueID uint32) ([]byte, error)
- func DeserializeMap(bs []byte) [][2]string
- func DispatchHttpCall(upstream string, headers types.Headers, body string, trailers types.Trailers, ...) (calloutID uint32, err error)
- func EnqueueSharedQueue(queueID uint32, data []byte) error
- func FinishVMContext()
- func GetDownstreamData(start, maxSize int) ([]byte, error)
- func GetHttpCallResponseBody(start, maxSize int) ([]byte, error)
- func GetHttpCallResponseHeaders() (types.Headers, error)
- func GetHttpCallResponseTrailers() (types.Trailers, error)
- func GetHttpRequestBody(start, maxSize int) ([]byte, error)
- func GetHttpRequestHeader(key string) (string, error)
- func GetHttpRequestHeaders() (types.Headers, error)
- func GetHttpRequestTrailer(key string) (string, error)
- func GetHttpRequestTrailers() (types.Trailers, error)
- func GetHttpResponseBody(start, maxSize int) ([]byte, error)
- func GetHttpResponseHeader(key string) (string, error)
- func GetHttpResponseHeaders() (types.Headers, error)
- func GetHttpResponseTrailer(key string) (string, error)
- func GetHttpResponseTrailers() (types.Trailers, error)
- func GetPluginConfiguration(size 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(size 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 PrependDownstreamData(data []byte) error
- func PrependHttpRequestBody(data []byte) error
- func PrependHttpResponseBody(data []byte) error
- func PrependUpstreamData(data []byte) error
- 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 ReplaceDownstreamData(data []byte) error
- func ReplaceHttpRequestBody(data []byte) error
- func ReplaceHttpResponseBody(data []byte) error
- func ReplaceUpstreamData(data []byte) error
- func ResolveSharedQueue(vmID, queueName string) (uint32, error)
- func ResumeHttpRequest() error
- func ResumeHttpResponse() error
- func SendHttpResponse(statusCode uint32, headers types.Headers, body []byte) error
- func SerializeMap(ms [][2]string) []byte
- func SerializePropertyPath(path []string) []byte
- func SetEffectiveContext(contextID uint32)
- func SetHttpRequestHeader(key, value string) error
- func SetHttpRequestHeaders(headers types.Headers) error
- func SetHttpRequestTrailer(key, value string) error
- func SetHttpRequestTrailers(trailers types.Trailers) error
- func SetHttpResponseHeader(key, value string) error
- func SetHttpResponseHeaders(headers types.Headers) error
- func SetHttpResponseTrailer(key, value string) error
- func SetHttpResponseTrailers(trailers types.Trailers) error
- func SetNewRootContext(f func(contextID uint32) RootContext)
- 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()
- func (*DefaultHttpContext) OnLog()
- type DefaultRootContext
- func (*DefaultRootContext) NewHttpContext(uint32) HttpContext
- func (*DefaultRootContext) NewStreamContext(uint32) StreamContext
- func (*DefaultRootContext) OnLog()
- func (*DefaultRootContext) OnPluginDone() bool
- func (*DefaultRootContext) OnPluginStart(int) types.OnPluginStartStatus
- func (*DefaultRootContext) OnQueueReady(uint32)
- func (*DefaultRootContext) OnTick()
- func (*DefaultRootContext) OnVMStart(int) types.OnVMStartStatus
- type DefaultStreamContext
- func (*DefaultStreamContext) OnDownstreamClose(types.PeerType)
- func (*DefaultStreamContext) OnDownstreamData(int, bool) types.Action
- func (*DefaultStreamContext) OnLog()
- 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 ¶
View Source
var ErrorRootContextNotFound = errors.New("root context not found")
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 AppendDownstreamData ¶ added in v0.2.0
func AppendHttpRequestBody ¶ added in v0.2.0
func AppendHttpResponseBody ¶ added in v0.2.0
func AppendUpstreamData ¶ added in v0.2.0
func CallForeignFunction ¶ added in v0.2.0
func CloseDownstream ¶ added in v0.2.0
func CloseDownstream() error
func CloseUpstream ¶ added in v0.2.0
func CloseUpstream() error
func ContinueDownstream ¶ added in v0.2.0
func ContinueDownstream() error
func ContinueUpstream ¶ added in v0.2.0
func ContinueUpstream() error
func DequeueSharedQueue ¶ added in v0.0.5
func DeserializeMap ¶
func DispatchHttpCall ¶ added in v0.0.5
func EnqueueSharedQueue ¶ added in v0.0.5
func FinishVMContext ¶ added in v0.0.13
func FinishVMContext()
func GetDownstreamData ¶ added in v0.2.0
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 PrependDownstreamData ¶ added in v0.2.0
func PrependHttpRequestBody ¶ added in v0.2.0
func PrependHttpResponseBody ¶ added in v0.2.0
func PrependUpstreamData ¶ added in v0.2.0
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 ReplaceDownstreamData ¶ added in v0.2.0
func ReplaceHttpRequestBody ¶ added in v0.2.0
func ReplaceHttpResponseBody ¶ added in v0.2.0
func ReplaceUpstreamData ¶ added in v0.2.0
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 SetNewRootContext ¶
func SetNewRootContext(f func(contextID uint32) RootContext)
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()
func (*DefaultHttpContext) OnLog ¶ added in v0.0.13
func (*DefaultHttpContext) OnLog()
type DefaultRootContext ¶ added in v0.0.5
type DefaultRootContext struct{}
func (*DefaultRootContext) NewHttpContext ¶ added in v0.0.15
func (*DefaultRootContext) NewHttpContext(uint32) HttpContext
func (*DefaultRootContext) NewStreamContext ¶ added in v0.0.15
func (*DefaultRootContext) NewStreamContext(uint32) StreamContext
func (*DefaultRootContext) OnLog ¶ added in v0.0.13
func (*DefaultRootContext) OnLog()
func (*DefaultRootContext) OnPluginDone ¶ added in v0.2.0
func (*DefaultRootContext) OnPluginDone() bool
func (*DefaultRootContext) OnPluginStart ¶ added in v0.0.5
func (*DefaultRootContext) OnPluginStart(int) types.OnPluginStartStatus
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) OnVMStart ¶ added in v0.0.5
func (*DefaultRootContext) OnVMStart(int) types.OnVMStartStatus
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) OnLog ¶ added in v0.0.13
func (*DefaultStreamContext) OnLog()
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() OnLog() }
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 RootContext interface { OnQueueReady(queueID uint32) OnTick() OnVMStart(vmConfigurationSize int) types.OnVMStartStatus OnPluginStart(pluginConfigurationSize int) types.OnPluginStartStatus OnPluginDone() bool OnLog() // Child context factories NewStreamContext(contextID uint32) StreamContext NewHttpContext(contextID uint32) HttpContext }
func GetRootContextByID ¶ added in v0.0.12
func GetRootContextByID(rootContextID uint32) (RootContext, error)
type StreamContext ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.