pub enum Output {
NeedMore {
deadline: Instant,
},
Routed {
cluster: ClusterId,
content_offset: usize,
proxy_source: Option<SocketAddr>,
sni: String,
alpn: Vec<Vec<u8>>,
matched_sni_pattern: String,
matched_alpn: AlpnMatcher,
},
Reject(RejectReason),
}Expand description
One outcome of SniPrereadCore::handle_input.
Variants§
NeedMore
Not enough bytes yet; deadline is the same value for the whole
lifetime of one SniPrereadCore (armed once, on the first
Bytes input).
Routed
A cluster was chosen. content_offset is how many leading bytes of
the ORIGINAL buffer are the (already-parsed) PROXY-v2 header – the
shell must skip exactly that many bytes before forwarding the
UNTOUCHED remainder to the backend verbatim.
Fields
proxy_source: Option<SocketAddr>matched_sni_pattern: StringThe trie KEY that matched – the route’s configured pattern, not
the client’s concrete SNI: for a wildcard route this is
*.example.com even when sni is a.example.com. Carries the
matched route’s identity so the shell/session can key
per-frontend state (e.g. access-log tags) without re-running the
lookup.
matched_alpn: AlpnMatcherClone of the winning route entry’s AlpnMatcher – the other
half of the matched route’s identity.
Reject(RejectReason)
Terminal, non-routable verdict. See RejectReason.