Crate proxy_sdk

Source

Modules§

env
native
property

Structs§

ConstCounter
Const wrapper for Counter
ConstGauge
Const wrapper for Gauge
ConstHistogram
Const wrapper for Histogram
Counter
Envoy counter metric handle
DownstreamData
Downstream data reference for a Stream filter
Gauge
Envoy gauge metric handle
GrpcCall
Outbound GRPC call
GrpcCallBuilder
Builder for GrpcCall.
GrpcCallResponse
Response type for GrpcCall::callback
GrpcCancelHandle
GRPC Call Handle to cancel a request
GrpcStream
Outbound GRPC stream (bidirectional)
GrpcStreamBuilder
Builder for GrpcStream.
GrpcStreamClose
Response type for GrpcStream::on_close
GrpcStreamHandle
GRPC stream handle to cancel, close, or send a message over a GRPC stream.
GrpcStreamMessage
Response type for GrpcStream::on_message
Histogram
Envoy histogram metric handle
HttpCall
Outbound HTTP call
HttpCallBuilder
Builder for HttpCall.
HttpCallResponse
Response type for HttpCall::callback
MetricsInfo
Queue
Shared Queues in proxy-wasm are a FIFO MPMC queue with no message duplication. Any WASM VM can resolve a queue or register new ones in their own VM ID. Any WASM VM can dequeue data, which will globally dequeue that item. Messages are not replicated to each WASM VM. When broadcasting data to many WASM VMs, it’s advised to have a scheme where each thread can register it’s own inbound queue, then enqueue the name of said queue to the centralized source of data. That source then enqueues to each WASM VM’s queue individually.
RequestBody
RequestHeaders
Request header context
RequestTrailers
ResponseBody
ResponseHeaders
ResponseTrailers
SharedData
A VM ID local atomic field. Any WASM VM in the same VM ID can read or write to any key in it’s VM ID. SharedData cannot cross VM IDs.
StreamClose
Context for a stream closing event
Upstream
A reference to an upstream cluster. In envoy this is an encoded protobuf. See Upstream::envoy_upstream.
UpstreamData
Upstream data reference for a Stream filter

Enums§

CloseType
Context
FilterDataStatus
Return status for body callbacks
FilterHeadersStatus
Return status for header callbacks
FilterStreamStatus
FilterTrailersStatus
Return status for trailer callbacks
GrpcCallBuilderError
Error type for GrpcCallBuilder
GrpcCode
Copied from tonic crate, GRPC status codes
GrpcStreamBuilderError
Error type for GrpcStreamBuilder
HeaderType
Defines which section the header data belongs too
HttpCallBuilderError
Error type for HttpCallBuilder
HttpType
Defines if data belongs to a request or response
Status
StreamType

Traits§

BaseContext
HttpBodyControl
Defines functions to interact with body data
HttpContext
Context for a HTTP filter plugin.
HttpControl
Defines control functions for http data
HttpHeaderControl
Defines functions to interact with header data
RootContext
StreamContext
Trait to implement stream filters (L4 filters).
StreamControl
Defines control functions for streams
StreamDataControl
Defines functions to interact with stream data

Functions§

call_foreign_function
Calls a foreign function as defined by the proxy.
instant_now
now
Fetches the realtime clock and stores it in a SystemTime
proxy_abi_version_0_2_1
proxy_on_memory_allocate
reset
Wipes all thread local state, to be used before any initialization in case of VM reuse in native mode
set_log_level
Sets the log level filter and installs a panic hook to log out panics.
set_root_context_factory
Sets root context factory. Should be called from _init. Can only be called once.
set_tick_period
Set tick period. Use Duration::ZERO to disable ticker.