Skip to main content

ManagerInput

Enum ManagerInput 

Source
pub enum ManagerInput<'a> {
    ClientDatagram {
        src: SocketAddr,
        payload: &'a [u8],
        backends: &'a mut dyn BackendSource,
    },
    BackendDatagram {
        flow: FlowId,
        payload: &'a [u8],
    },
    Config(ConfigEvent),
}
Expand description

Inputs the shell feeds into the manager. Borrows the recv buffer; the core copies into an owned Vec<u8> only on admission.

Debug is hand-written rather than derived because ManagerInput::ClientDatagram carries a &mut dyn BackendSource, which has no Debug bound and should not gain one for a diagnostic. The mux’s Position renders itself the same way and for the same reason: the handle is elided, everything else is shown.

Variants§

§

ClientDatagram

A datagram from a client. Admitted into an existing/new flow or dropped.

Carries the backend view because this is the only input that selects: admission resolves a backend before the flow exists, so the view arrives with the datagram that needs it rather than on every entry point. Three of the four inputs cannot select, and a signature that demanded a backend set from all of them would say otherwise.

Fields

§src: SocketAddr

Real (pre-NAT) client source address.

§payload: &'a [u8]

Borrowed datagram bytes.

§backends: &'a mut dyn BackendSource

The backend set to select from, for this admission only.

§

BackendDatagram

A datagram from a backend, tagged by the shell with the owning flow (upstream_token -> FlowId). Drives the symmetric NAT return path.

Fields

§flow: FlowId

Flow that owns the connected upstream socket this arrived on.

§payload: &'a [u8]

Borrowed datagram bytes.

§

Config(ConfigEvent)

A control-plane / health event (add/remove backend, LB algo, timeouts, per-cluster knobs, drain). Never allocates a flow.

Trait Implementations§

Source§

impl Debug for ManagerInput<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for ManagerInput<'a>

§

impl<'a> !Send for ManagerInput<'a>

§

impl<'a> !Sync for ManagerInput<'a>

§

impl<'a> !UnwindSafe for ManagerInput<'a>

§

impl<'a> Freeze for ManagerInput<'a>

§

impl<'a> Unpin for ManagerInput<'a>

§

impl<'a> UnsafeUnpin for ManagerInput<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.