pub struct DoraNodeBuilder { /* private fields */ }Expand description
Builder for initializing a node with custom connection parameters.
Created via DoraNode::builder(). Callers who don’t need a custom daemon
port should prefer DoraNode::init_from_env or
DoraNode::init_from_node_id. Setting node_id selects
the dynamic-node path; otherwise build falls back to
DoraNode::init_from_env.
Implementations§
Source§impl DoraNodeBuilder
impl DoraNodeBuilder
Sourcepub fn node_id(self, node_id: NodeId) -> Self
pub fn node_id(self, node_id: NodeId) -> Self
Set the node ID. Presence of a node ID selects the dynamic-node path.
Sourcepub fn dynamic(self) -> Self
pub fn dynamic(self) -> Self
No-op kept for source compatibility with upstream dora 0.5.x
#1591. Upstream gates the
dynamic-node path on an explicit .dynamic() call; here, dynamic mode
is selected by the presence of node_id, making the flag redundant.
Kept so that .node_id(id).dynamic().build() written against upstream
still compiles.
Sourcepub fn daemon_port(self, port: u16) -> Self
pub fn daemon_port(self, port: u16) -> Self
Override the daemon port. When unset, the builder honours the
DORA_DAEMON_LOCAL_LISTEN_PORT env var and falls back to
DORA_DAEMON_LOCAL_LISTEN_PORT_DEFAULT.
Sourcepub fn build(self) -> NodeResult<(DoraNode, EventStream)>
pub fn build(self) -> NodeResult<(DoraNode, EventStream)>
Build and connect the node.
Trait Implementations§
Source§impl Default for DoraNodeBuilder
impl Default for DoraNodeBuilder
Source§fn default() -> DoraNodeBuilder
fn default() -> DoraNodeBuilder
Auto Trait Implementations§
impl Freeze for DoraNodeBuilder
impl RefUnwindSafe for DoraNodeBuilder
impl Send for DoraNodeBuilder
impl Sync for DoraNodeBuilder
impl Unpin for DoraNodeBuilder
impl UnsafeUnpin for DoraNodeBuilder
impl UnwindSafe for DoraNodeBuilder
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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