pub enum Output {
SelectBackend {
flow: FlowId,
cluster: ClusterId,
key: u64,
},
OpenUpstream {
flow: FlowId,
backend: SocketAddr,
},
SendToBackend(Transmit),
SendToClient(Transmit),
ArmTimer(Instant),
Metric(MetricEvent),
CloseFlow(FlowId),
Drop(DropReason),
}Expand description
Outputs the manager emits; the shell drains them via poll_output until
None. The shell owns the actual syscalls and timer wheel.
Variants§
SelectBackend
A new flow needs a backend. The shell consults the BackendMap with
(cluster, key) and replies with ManagerInput::BackendResolved.
Fields
OpenUpstream
The shell should connect() a fresh upstream socket for this flow and
register upstream_token -> flow for NAT return demux.
Fields
backend: SocketAddrBackend address to connect to.
SendToBackend(Transmit)
Write an owned datagram to the backend (PPv2-prefixed when applicable).
SendToClient(Transmit)
Write an owned datagram back to the real client (symmetric NAT return).
ArmTimer(Instant)
Re-arm the single manager-wide timer at this absolute deadline. The shell owns the wheel; the core only ever requests one deadline.
Metric(MetricEvent)
A metric event for the shell to translate into udp.* counters/gauges.
CloseFlow(FlowId)
Tear down a flow (idle / responses-reached / requests-reached / drain).
The shell closes the upstream socket, frees the slab slot, and
decrements udp.active_flows.
Drop(DropReason)
A datagram was dropped before allocating any flow/buffer/socket (“silence is a virtue”). Carries the reason for metrics/logs.
Trait Implementations§
impl Eq for Output
impl StructuralPartialEq for Output
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnsafeUnpin for Output
impl UnwindSafe for Output
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.