pub enum StreamConfig {
Tcp(Option<TcpConfig>),
Grpc(Option<GrpcConfig>),
}Expand description
Streaming transport configuration for a Velo instance.
Only one StreamConfig may be set per VeloBuilder instance —
one streaming server per Velo instance is enforced.
§Default
If neither VeloBuilder::stream_config nor VeloBuilder::stream_bind_addr
is called, the builder defaults to StreamConfig::Tcp(None)
— bind 0.0.0.0:<ephemeral> and advertise every UP non-loopback interface
via Vec<InterfaceEndpoint>
in the local WorkerAddress. The peer-side register() walks the
advertised list and calls select_best_endpoint (NUMA + subnet match)
against its own interfaces to choose a routable address — multi-node
correctness comes from interface advertisement, not from defaulting away
from TCP.
§Variants
-
StreamConfig::Tcp: TCP-based streaming viaTcpFrameTransport. PassNoneto bind on0.0.0.0:0, or provide aTcpConfigfor an explicit single-interface bind. -
StreamConfig::Grpc: gRPC-based streaming viaGrpcFrameTransport. Only available when thegrpcfeature is enabled. Same advertise-and-select semantics asTcp.
Variants§
Tcp(Option<TcpConfig>)
TCP-based streaming transport (TcpFrameTransport).
Grpc(Option<GrpcConfig>)
gRPC-based streaming transport (GrpcFrameTransport).
Trait Implementations§
Source§impl Clone for StreamConfig
impl Clone for StreamConfig
Source§fn clone(&self) -> StreamConfig
fn clone(&self) -> StreamConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for StreamConfig
impl RefUnwindSafe for StreamConfig
impl Send for StreamConfig
impl Sync for StreamConfig
impl Unpin for StreamConfig
impl UnsafeUnpin for StreamConfig
impl UnwindSafe for StreamConfig
Blanket Implementations§
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request