pub struct Config {
pub listen: Vec<Transport>,
pub discovery: DiscoveryConfig,
pub compression: CompressionConfig,
pub ping_interval: Duration,
pub idle_timeout: Duration,
pub transport_specific_metrics: bool,
}Expand description
The network actors’ config.
§Examples
[system.network]
listen = ["tcp://0.0.0.1:8150"]
discovery.predefined = [
"tcp://localhost:4242",
"uds:///tmp/sock"
]Fields§
§listen: Vec<Transport>A list of addresses to listen on.
If changed, all existing connections related to removed transports are closed immediately. New listeners are created for added transports.
discovery: DiscoveryConfigHow to discover other nodes.
compression: CompressionConfigCompression settings.
ping_interval: DurationHow often nodes should ping each other.
Pings are used to measure RTT and detect dead connections.
For the latest purpose, see idle_timeout.
5s by default.
idle_timeout: DurationThe maximum inactivity time of every connection.
If no data is received on a connection for over idle_timeout time,
the connection is considered dead and will be automatically closed.
This timeout is checked every ping_interval time, so the actual time
lies in the range of idle_timeout to idle_timeout + ping_interval.
30s by default.
transport_specific_metrics: boolEnables transport-specific metrics reporting.
Note: Only Linux/TCP is currently supported. See libc::tcp_info.
false by default.