Struct jormungandr::settings::start::config::Connection
source · pub struct Connection {
pub public_address: Option<Multiaddr>,
pub listen: Option<Address>,
pub max_connections: Option<usize>,
pub max_client_connections: Option<usize>,
pub max_connections_threshold: Option<usize>,
pub allow_private_addresses: bool,
pub whitelist: Option<Vec<Multiaddr>>,
pub gossip_interval: Option<Duration>,
pub network_stuck_check: Option<Duration>,
pub dns_server_address: Option<Address>,
}
Expand description
Start up connection configuration
Fields§
§public_address: Option<Multiaddr>
The public address to which other peers may connect to
listen: Option<Address>
The socket address to listen on, if different from the public address. The format is “{ip_address}:{port}”. The IP address can be specified as 0.0.0.0 or :: to listen on all network interfaces.
max_connections: Option<usize>
Limit on the number of simultaneous connections. If not specified, an internal default limit is used.
max_client_connections: Option<usize>
Limit on the number of simultaneous client connections. If not specified, an internal default limit is used.
max_connections_threshold: Option<usize>
This setting is not used and is left for backward compatibility.
allow_private_addresses: bool
Whether to allow non-public IP addresses on the network. The default is to not allow advertising non-public IP addresses.
whitelist: Option<Vec<Multiaddr>>
contains addrs of nodes which we can accept fragments from
gossip_interval: Option<Duration>
interval to start gossiping with new nodes, changing the value will affect the bandwidth. The more often the node will gossip the more bandwidth the node will need. The less often the node gossips the less good the resilience to node churn.
The default value is 10seconds.
network_stuck_check: Option<Duration>
if no gossip has been received in the last interval, try to connect to nodes that were previously known to this node.
The default value is 5 min.
dns_server_address: Option<Address>
If given, specifies the address of the DNS server to connect to for executing DNS lookups.
Trait Implementations§
source§impl Clone for Connection
impl Clone for Connection
source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Connection
impl Debug for Connection
source§impl Default for Connection
impl Default for Connection
source§fn default() -> Connection
fn default() -> Connection
source§impl<'de> Deserialize<'de> for Connection
impl<'de> Deserialize<'de> for Connection
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>,
Auto Trait Implementations§
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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> 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
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