[][src]Trait envoy_sdk::host::stream_info::StreamInfo

pub trait StreamInfo {
    fn stream_property(&self, path: &[&str]) -> Result<Option<ByteString>>;
fn set_stream_property(&self, path: &[&str], value: &[u8]) -> Result<()>; }

An interface of the Envoy Stream Info API.

Basic usage of StreamInfo:

use envoy::host::StreamInfo;

let stream_info = StreamInfo::default();

let connection_id = stream_info.connection().id()?;
let request_id = stream_info.request().id()?;
let plugin_name = stream_info.plugin().name()?;

stream_info.set_stream_property(&["my_extension", "output"], b"property value")?;

Required methods

fn stream_property(&self, path: &[&str]) -> Result<Option<ByteString>>

Evaluates value of a given property in the enclosing context.

  • In case HttpFilter, the value will be evaluated in the context of HTTP stream.
  • In case NetworkFilter, the value will be evaluated in the context of TCP connection.
  • In case AccessLogger, the value will be evaluated in the context of HTTP stream or TCP connection that is being logged.

Arguments

  • path - property path as an array of path segments

fn set_stream_property(&self, path: &[&str], value: &[u8]) -> Result<()>

Saves a value in the enclosing context.

The value will be accessible to other filters on that HTTP stream or TCP connection.

Arguments

  • path - property path as an array of path segments
  • value - an opaque blob of bytes
Loading content...

Implementations

impl dyn StreamInfo[src]

pub fn default() -> &'static dyn StreamInfo[src]

Returns the default implementation that interacts with Envoy through its ABI.

impl<'a> dyn StreamInfo + 'a[src]

pub fn request(&'a self) -> RequestInfo<'a>[src]

Provides access to request properties.

pub fn response(&'a self) -> ResponseInfo<'a>[src]

Provides access to response properties.

pub fn connection(&'a self) -> ConnectionInfo<'a>[src]

Provides access to connection properties.

pub fn upstream(&'a self) -> UpstreamInfo<'a>[src]

Provides access to upstream properties.

pub fn source(&'a self) -> SourceInfo<'a>[src]

Provides access to source properties.

pub fn destination(&'a self) -> DestinationInfo<'a>[src]

Provides access to destination properties.

pub fn listener(&'a self) -> ListenerInfo<'a>[src]

Provides access to listener properties.

pub fn route(&'a self) -> RouteInfo<'a>[src]

Provides access to route properties.

pub fn cluster(&'a self) -> ClusterInfo<'a>[src]

Provides access to cluster properties.

pub fn plugin(&'a self) -> PluginInfo<'a>[src]

Provides access to plugin properties.

Implementors

Loading content...