Struct quilkin::filters::concatenate_bytes::ConcatenateBytes
source · [−]pub struct ConcatenateBytes { /* private fields */ }
Expand description
The ConcatenateBytes
filter’s job is to add a byte packet to either the
beginning or end of each UDP packet that passes through. This is commonly
used to provide an auth token to each packet, so they can be
routed appropriately.
Implementations
Trait Implementations
sourceimpl Filter for ConcatenateBytes
impl Filter for ConcatenateBytes
sourcefn read(&self, ctx: &mut ReadContext) -> Option<()>
fn read(&self, ctx: &mut ReadContext) -> Option<()>
Filter::read
is invoked when the proxy receives data from a
downstream connection on the listening port. Read moresourcefn write(&self, ctx: &mut WriteContext) -> Option<()>
fn write(&self, ctx: &mut WriteContext) -> Option<()>
Filter::write
is invoked when the proxy is about to send data to a
downstream connection via the listening port after receiving it via one
of the upstream Endpoints. Read moresourceimpl StaticFilter for ConcatenateBytes
impl StaticFilter for ConcatenateBytes
sourceconst NAME: &'static str = "quilkin.filters.concatenate_bytes.v1alpha1.ConcatenateBytes"
const NAME: &'static str = "quilkin.filters.concatenate_bytes.v1alpha1.ConcatenateBytes"
The globally unique name of the filter.
type Configuration = Config
type Configuration = Config
The human-readable configuration of the filter. Must be
serde
compatible, have a JSON schema, and be convertible to and
from Self::BinaryConfiguration
. Read moretype BinaryConfiguration = ConcatenateBytes
type BinaryConfiguration = ConcatenateBytes
The binary configuration of the filter. Must be
prost
compatible,
and be convertible to and from Self::Configuration
. Read moresourcefn try_from_config(config: Option<Self::Configuration>) -> Result<Self, Error>
fn try_from_config(config: Option<Self::Configuration>) -> Result<Self, Error>
Instantiates a new
StaticFilter
from the given configuration, if any. Read moresourcefn from_config(config: Option<Self::Configuration>) -> Self
fn from_config(config: Option<Self::Configuration>) -> Self
Instantiates a new
StaticFilter
from the given configuration, if any. Read moresourcefn factory() -> DynFilterFactorywhere
Self: 'static,
fn factory() -> DynFilterFactorywhere
Self: 'static,
Creates a new dynamic
FilterFactory
virtual table.sourcefn ensure_config_exists(
config: Option<Self::Configuration>
) -> Result<Self::Configuration, Error>
fn ensure_config_exists(
config: Option<Self::Configuration>
) -> Result<Self::Configuration, Error>
Convenience method for providing a consistent error message for filters
which require a fully initialized
Self::Configuration
. Read morefn as_filter_config(
config: impl Into<Option<Self::Configuration>>
) -> Result<Filter, Error>
Auto Trait Implementations
impl RefUnwindSafe for ConcatenateBytes
impl Send for ConcatenateBytes
impl Sync for ConcatenateBytes
impl Unpin for ConcatenateBytes
impl UnwindSafe for ConcatenateBytes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request