pub struct NodeManagerBuilder {
pub primary_node: Option<NodeDto>,
pub primary_pow_node: Option<NodeDto>,
pub nodes: HashSet<NodeDto>,
pub permanodes: HashSet<NodeDto>,
pub ignore_node_health: bool,
pub node_sync_interval: Duration,
pub quorum: bool,
pub min_quorum_size: usize,
pub quorum_threshold: usize,
pub user_agent: String,
}
Available on crate feature
client
only.Expand description
Node manager builder
Fields§
§primary_node: Option<NodeDto>
Node which will be tried first for all requests
primary_pow_node: Option<NodeDto>
Node which will be tried first when using remote PoW, even before the primary_node
nodes: HashSet<NodeDto>
Nodes
permanodes: HashSet<NodeDto>
Permanodes
ignore_node_health: bool
If the node health should be ignored
node_sync_interval: Duration
Interval in which nodes will be checked for their sync status and the NetworkInfo gets updated
quorum: bool
If node quorum is enabled. Will compare the responses from multiple nodes and only returns the response if
quorum_threshold
% of the nodes return the same one
min_quorum_size: usize
Minimum amount of nodes required for request when quorum is enabled
quorum_threshold: usize
% of nodes that have to return the same response so it gets accepted
user_agent: String
The User-Agent header for requests
Trait Implementations§
Source§impl Clone for NodeManagerBuilder
impl Clone for NodeManagerBuilder
Source§fn clone(&self) -> NodeManagerBuilder
fn clone(&self) -> NodeManagerBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NodeManagerBuilder
impl Debug for NodeManagerBuilder
Source§impl Default for NodeManagerBuilder
impl Default for NodeManagerBuilder
Source§impl<'de> Deserialize<'de> for NodeManagerBuilder
impl<'de> Deserialize<'de> for NodeManagerBuilder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&NodeManager> for NodeManagerBuilder
impl From<&NodeManager> for NodeManagerBuilder
Source§fn from(value: &NodeManager) -> Self
fn from(value: &NodeManager) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NodeManagerBuilder
impl PartialEq for NodeManagerBuilder
Source§impl Serialize for NodeManagerBuilder
impl Serialize for NodeManagerBuilder
impl Eq for NodeManagerBuilder
impl StructuralPartialEq for NodeManagerBuilder
Auto Trait Implementations§
impl Freeze for NodeManagerBuilder
impl RefUnwindSafe for NodeManagerBuilder
impl Send for NodeManagerBuilder
impl Sync for NodeManagerBuilder
impl Unpin for NodeManagerBuilder
impl UnwindSafe for NodeManagerBuilder
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key
and return true
if they are equal.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>
Converts
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>
Converts
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 more