pub struct TcpFilterContext<'a> {
pub remote_addr: &'a str,
pub local_addr: &'a str,
pub sni: Option<&'a str>,
pub upstream_addr: Option<Cow<'a, str>>,
pub cluster: Option<Arc<str>>,
pub health_registry: Option<&'a HealthRegistry>,
pub kv_stores: Option<&'a KvStoreRegistry>,
pub connect_time: Instant,
pub bytes_in: u64,
pub bytes_out: u64,
}Expand description
Per-connection state for TCP filters.
Fields§
§remote_addr: &'a strRemote client address.
local_addr: &'a strLocal listener address.
sni: Option<&'a str>SNI hostname extracted from the TLS ClientHello, if present.
upstream_addr: Option<Cow<'a, str>>Upstream address being proxied to.
None until a static upstream or a filter (e.g. sni_router)
provides one.
cluster: Option<Arc<str>>Cluster name selected for this connection.
Set by the listener config when cluster is configured.
Read by tcp_load_balancer to look up the strategy.
health_registry: Option<&'a HealthRegistry>Shared health registry for endpoint health lookups.
kv_stores: Option<&'a KvStoreRegistry>Named key-value stores for runtime mappings.
connect_time: InstantWhen the connection was accepted.
bytes_in: u64Bytes received from client (populated after forwarding completes).
bytes_out: u64Bytes sent to client (populated after forwarding completes).
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TcpFilterContext<'a>
impl<'a> !UnwindSafe for TcpFilterContext<'a>
impl<'a> Freeze for TcpFilterContext<'a>
impl<'a> Send for TcpFilterContext<'a>
impl<'a> Sync for TcpFilterContext<'a>
impl<'a> Unpin for TcpFilterContext<'a>
impl<'a> UnsafeUnpin for TcpFilterContext<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more