Struct hersir::config::SpawnParams
source · pub struct SpawnParams {Show 27 fields
alias: NodeAlias,
bootstrap_from_peers: Option<bool>,
faketime: Option<FaketimeConfig>,
gossip_interval: Option<Duration>,
jormungandr: Option<PathBuf>,
leadership_mode: LeadershipMode,
listen_address: Option<Option<SocketAddr>>,
log_level: Option<LogLevel>,
max_bootstrap_attempts: Option<usize>,
max_connections: Option<u32>,
allow_private_addresses: Option<bool>,
whitelist: Option<Vec<Multiaddr>>,
max_inbound_connections: Option<u32>,
mempool: Option<Mempool>,
network_stuck_check: Option<Duration>,
node_key_file: Option<PathBuf>,
persistence_mode: PersistenceMode,
persistent_fragment_log: Option<PathBuf>,
policy: Option<Policy>,
preferred_layer: Option<PreferredListConfig>,
public_address: Option<Multiaddr>,
skip_bootstrap: Option<bool>,
topics_of_interest: Option<TopicsOfInterest>,
trusted_peers: Option<Vec<TrustedPeer>>,
version: Option<Version>,
verbose: bool,
dns_server_address: Option<SocketAddr>,
}
Fields§
§alias: NodeAlias
§bootstrap_from_peers: Option<bool>
§faketime: Option<FaketimeConfig>
§gossip_interval: Option<Duration>
§jormungandr: Option<PathBuf>
§leadership_mode: LeadershipMode
§listen_address: Option<Option<SocketAddr>>
§log_level: Option<LogLevel>
§max_bootstrap_attempts: Option<usize>
§max_connections: Option<u32>
§allow_private_addresses: Option<bool>
§whitelist: Option<Vec<Multiaddr>>
§max_inbound_connections: Option<u32>
§mempool: Option<Mempool>
§network_stuck_check: Option<Duration>
§node_key_file: Option<PathBuf>
§persistence_mode: PersistenceMode
§persistent_fragment_log: Option<PathBuf>
§policy: Option<Policy>
§preferred_layer: Option<PreferredListConfig>
§public_address: Option<Multiaddr>
§skip_bootstrap: Option<bool>
§topics_of_interest: Option<TopicsOfInterest>
§trusted_peers: Option<Vec<TrustedPeer>>
§version: Option<Version>
§verbose: bool
§dns_server_address: Option<SocketAddr>
Implementations§
source§impl SpawnParams
impl SpawnParams
pub fn new(alias: &str) -> Self
pub fn get_alias(&self) -> &NodeAlias
pub fn no_listen_address(self) -> Self
pub fn listen_address(self, address: Option<SocketAddr>) -> Self
pub fn persistent_fragment_log<P: AsRef<Path>>(self, path: P) -> Self
pub fn get_leadership_mode(&self) -> LeadershipMode
pub fn is_leader(&self) -> bool
pub fn get_persistence_mode(&self) -> PersistenceMode
pub fn get_version(&self) -> &Option<Version>
pub fn get_verbose(&self) -> bool
pub fn topics_of_interest(self, topics_of_interest: TopicsOfInterest) -> Self
pub fn public_address(self, public_address: Multiaddr) -> Self
pub fn verbose(self, verbose: bool) -> Self
pub fn version(self, version: Version) -> Self
pub fn max_connections(self, max_connections: u32) -> Self
pub fn allow_private_addresses(self, switch: bool) -> Self
pub fn whitelist(self, nodes: Vec<Multiaddr>) -> Self
pub fn max_inbound_connections(self, max_inbound_connections: u32) -> Self
pub fn skip_bootstrap(self, skip_bootstrap: bool) -> Self
pub fn mempool(self, mempool: Mempool) -> Self
pub fn bootstrap_from_peers(self, bootstrap_from_peers: bool) -> Self
pub fn trusted_peers(self, trusted_peers: Vec<TrustedPeer>) -> Self
pub fn preferred_layer(self, preferred_layer: PreferredListConfig) -> Self
pub fn policy(self, policy: Policy) -> Self
pub fn jormungandr(self, jormungandr_app_path: PathBuf) -> Self
pub fn passive(self) -> Self
pub fn leader(self) -> Self
pub fn in_memory(self) -> Self
pub fn leadership_mode(self, leadership_mode: LeadershipMode) -> Self
pub fn persistence_mode(self, persistence_mode: PersistenceMode) -> Self
pub fn node_key_file(self, node_key_file: PathBuf) -> Self
pub fn faketime(self, faketime: FaketimeConfig) -> Self
pub fn get_faketime(&self) -> Option<&FaketimeConfig>
pub fn gossip_interval(self, duration: Duration) -> Self
pub fn log_level(self, level: LogLevel) -> Self
pub fn get_log_level(&self) -> Option<&LogLevel>
pub fn max_bootstrap_attempts(self, attempts: usize) -> Self
pub fn network_stuck_check(self, duration: Duration) -> Self
pub fn get_jormungandr(&self) -> &Option<PathBuf>
pub fn with_dns_server_address(self, addr: SocketAddr) -> Self
pub fn dns_server_address(&self) -> Option<&SocketAddr>
pub fn override_settings(&self, node_config: &mut NodeConfig)
Trait Implementations§
source§impl Clone for SpawnParams
impl Clone for SpawnParams
source§fn clone(&self) -> SpawnParams
fn clone(&self) -> SpawnParams
Returns a copy 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 SpawnParams
impl Debug for SpawnParams
source§impl<'de> Deserialize<'de> for SpawnParams
impl<'de> Deserialize<'de> for SpawnParams
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
Auto Trait Implementations§
impl RefUnwindSafe for SpawnParams
impl Send for SpawnParams
impl Sync for SpawnParams
impl Unpin for SpawnParams
impl UnwindSafe for SpawnParams
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Wrap the input message
T
in a tonic::Request