Documentation
¶
Index ¶
- func DeserializeMap(bs []byte) [][2]string
- func HostCallAddHttpRequestHeader(key, value string) error
- func HostCallAddHttpRequestTrailer(key, value string) error
- func HostCallAddHttpResponseHeader(key, value string) error
- func HostCallAddHttpResponseTrailer(key, value string) error
- func HostCallDequeueSharedQueue(queueID uint32) ([]byte, error)
- func HostCallDispatchHttpCall(upstream string, headers [][2]string, body string, trailers [][2]string, ...) (uint32, error)
- func HostCallDone()
- func HostCallEnqueueSharedQueue(queueID uint32, data []byte) error
- func HostCallGetCurrentTime() int64
- func HostCallGetDownStreamData(start, maxSize int) ([]byte, error)
- func HostCallGetHttpCallResponseBody(start, maxSize int) ([]byte, error)
- func HostCallGetHttpCallResponseHeaders() ([][2]string, error)
- func HostCallGetHttpCallResponseTrailers() ([][2]string, error)
- func HostCallGetHttpRequestBody(start, maxSize int) ([]byte, error)
- func HostCallGetHttpRequestHeader(key string) (string, error)
- func HostCallGetHttpRequestHeaders() ([][2]string, error)
- func HostCallGetHttpRequestTrailer(key string) (string, error)
- func HostCallGetHttpRequestTrailers() ([][2]string, error)
- func HostCallGetHttpResponseBody(start, maxSize int) ([]byte, error)
- func HostCallGetHttpResponseHeader(key string) (string, error)
- func HostCallGetHttpResponseHeaders() ([][2]string, error)
- func HostCallGetHttpResponseTrailer(key string) (string, error)
- func HostCallGetHttpResponseTrailers() ([][2]string, error)
- func HostCallGetPluginConfiguration(dataSize int) ([]byte, error)
- func HostCallGetSharedData(key string) (value []byte, cas uint32, err error)
- func HostCallGetUpstreamData(start, maxSize int) ([]byte, error)
- func HostCallGetVMConfiguration(dataSize int) ([]byte, error)
- func HostCallRegisterSharedQueue(name string) (uint32, error)
- func HostCallRemoveHttpRequestHeader(key string) error
- func HostCallRemoveHttpRequestTrailer(key string) error
- func HostCallRemoveHttpResponseHeader(key string) error
- func HostCallRemoveHttpResponseTrailer(key string) error
- func HostCallResolveSharedQueue(vmID, queueName string) (uint32, error)
- func HostCallResumeHttpRequest() error
- func HostCallResumeHttpResponse() error
- func HostCallSendHttpResponse(statusCode uint32, headers [][2]string, body string) types.Status
- func HostCallSetHttpRequestHeader(key, value string) error
- func HostCallSetHttpRequestHeaders(headers [][2]string) error
- func HostCallSetHttpRequestTrailer(key, value string) error
- func HostCallSetHttpRequestTrailers(headers [][2]string) error
- func HostCallSetHttpResponseHeader(key, value string) error
- func HostCallSetHttpResponseHeaders(headers [][2]string) error
- func HostCallSetHttpResponseTrailer(key, value string) error
- func HostCallSetHttpResponseTrailers(headers [][2]string) error
- func HostCallSetSharedData(key string, data []byte, cas uint32) error
- func HostCallSetTickPeriodMilliSeconds(millSec uint32) error
- func LogCritical(msgs ...string)
- func LogDebug(msgs ...string)
- func LogError(msgs ...string)
- func LogInfo(msgs ...string)
- func LogTrace(msgs ...string)
- func LogWarn(msgs ...string)
- func RawBytePtrToByteSlice(raw *byte, size int) []byte
- func RawBytePtrToString(raw *byte, size int) string
- func SerializeMap(ms [][2]string) []byte
- func SetNewHttpContext(f func(contextID uint32) HttpContext)
- func SetNewRootContext(f func(contextID uint32) RootContext)
- func SetNewStreamContext(f func(contextID uint32) StreamContext)
- type Context
- type DefaultContext
- func (d DefaultContext) OnConfigure(int) bool
- func (d DefaultContext) OnDone() bool
- func (d DefaultContext) OnDownstreamClose(types.PeerType)
- func (d DefaultContext) OnDownstreamData(int, bool) types.Action
- func (d DefaultContext) OnHttpCallResponse(int, int, int)
- func (d DefaultContext) OnHttpRequestBody(int, bool) types.Action
- func (d DefaultContext) OnHttpRequestHeaders(int, bool) types.Action
- func (d DefaultContext) OnHttpRequestTrailers(int) types.Action
- func (d DefaultContext) OnHttpResponseBody(int, bool) types.Action
- func (d DefaultContext) OnHttpResponseHeaders(int, bool) types.Action
- func (d DefaultContext) OnHttpResponseTrailers(int) types.Action
- func (d DefaultContext) OnLog()
- func (d DefaultContext) OnNewConnection() types.Action
- func (d DefaultContext) OnQueueReady(uint32)
- func (d DefaultContext) OnTick()
- func (d DefaultContext) OnUpstreamClose(types.PeerType)
- func (d DefaultContext) OnUpstreamData(int, bool) types.Action
- func (d DefaultContext) OnVMStart(int) bool
- type HttpContext
- type MetricCounter
- type MetricGauge
- type MetricHistogram
- type RootContext
- type StreamContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeMap ¶
func HostCallDone ¶
func HostCallDone()
func HostCallGetCurrentTime ¶
func HostCallGetCurrentTime() int64
func HostCallGetSharedData ¶
func HostCallGetUpstreamData ¶
func HostCallResolveSharedQueue ¶
TODO: not sure if the ABI is correct
func HostCallResumeHttpRequest ¶
func HostCallResumeHttpRequest() error
func HostCallResumeHttpResponse ¶
func HostCallResumeHttpResponse() error
func LogCritical ¶
func LogCritical(msgs ...string)
func RawBytePtrToByteSlice ¶
func RawBytePtrToString ¶
func SerializeMap ¶
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)
Types ¶
type DefaultContext ¶
type DefaultContext struct{}
func (DefaultContext) OnDownstreamClose ¶
func (d DefaultContext) OnDownstreamClose(types.PeerType)
func (DefaultContext) OnDownstreamData ¶
func (d DefaultContext) OnDownstreamData(int, bool) types.Action
impl StreamContext
func (DefaultContext) OnHttpCallResponse ¶
func (d DefaultContext) OnHttpCallResponse(int, int, int)
func (DefaultContext) OnHttpRequestBody ¶
func (d DefaultContext) OnHttpRequestBody(int, bool) types.Action
func (DefaultContext) OnHttpRequestHeaders ¶
func (d DefaultContext) OnHttpRequestHeaders(int, bool) types.Action
impl HttpContext
func (DefaultContext) OnHttpRequestTrailers ¶
func (d DefaultContext) OnHttpRequestTrailers(int) types.Action
func (DefaultContext) OnHttpResponseBody ¶
func (d DefaultContext) OnHttpResponseBody(int, bool) types.Action
func (DefaultContext) OnHttpResponseHeaders ¶
func (d DefaultContext) OnHttpResponseHeaders(int, bool) types.Action
func (DefaultContext) OnHttpResponseTrailers ¶
func (d DefaultContext) OnHttpResponseTrailers(int) types.Action
func (DefaultContext) OnLog ¶
func (d DefaultContext) OnLog()
func (DefaultContext) OnNewConnection ¶
func (d DefaultContext) OnNewConnection() types.Action
func (DefaultContext) OnQueueReady ¶
func (d DefaultContext) OnQueueReady(uint32)
func (DefaultContext) OnTick ¶
func (d DefaultContext) OnTick()
func (DefaultContext) OnUpstreamClose ¶
func (d DefaultContext) OnUpstreamClose(types.PeerType)
func (DefaultContext) OnUpstreamData ¶
func (d DefaultContext) OnUpstreamData(int, bool) types.Action
func (DefaultContext) OnVMStart ¶
func (d DefaultContext) OnVMStart(int) bool
type HttpContext ¶
type HttpContext interface { Context 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 }
type MetricCounter ¶
type MetricCounter uint32
func DefineCounterMetric ¶
func DefineCounterMetric(name string) (MetricCounter, error)
func (MetricCounter) Get ¶
func (m MetricCounter) Get() (uint64, error)
func (MetricCounter) ID ¶
func (m MetricCounter) ID() uint32
func (MetricCounter) Increment ¶
func (m MetricCounter) Increment(offset uint64) error
type MetricGauge ¶
type MetricGauge uint32
func DefineGaugeMetric ¶
func DefineGaugeMetric(name string) (MetricGauge, error)
func (MetricGauge) Add ¶
func (m MetricGauge) Add(offset int64) error
func (MetricGauge) Get ¶
func (m MetricGauge) Get() (int64, error)
func (MetricGauge) ID ¶
func (m MetricGauge) ID() uint32
type MetricHistogram ¶
type MetricHistogram uint32
func DefineHistogramMetric ¶
func DefineHistogramMetric(name string) (MetricHistogram, error)
func (MetricHistogram) Get ¶
func (m MetricHistogram) Get() (uint64, error)
func (MetricHistogram) ID ¶
func (m MetricHistogram) ID() uint32
func (MetricHistogram) Record ¶
func (m MetricHistogram) Record(value uint64) error
type RootContext ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.