pub struct ShardOptions {
Show 13 fields pub max_shard_peers: usize, pub max_shard_neighbours: usize, pub max_broadcast_log: u32, pub broadcast_gc_interval_ms: u64, pub overlay_peers_timeout_ms: u64, pub max_ordinary_broadcast_len: usize, pub broadcast_target_count: usize, pub secondary_broadcast_target_count: usize, pub secondary_fec_broadcast_target_count: usize, pub broadcast_wave_len: usize, pub broadcast_wave_interval_ms: u64, pub broadcast_timeout_sec: u64, pub force_compression: bool,
}
Expand description

Overlay shard configuration

Fields

max_shard_peers: usize

Instant random peers list length. Used to select neighbours.

Default: 20

max_shard_neighbours: usize

More persistent list of peers. Used to distribute broadcasts.

Default: 5

max_broadcast_log: u32

Max simultaneous broadcasts.

Default: 1000

broadcast_gc_interval_ms: u64

Broadcasts GC interval. Will leave at most max_broadcast_log each iteration.

Default: 1000 ms

overlay_peers_timeout_ms: u64

Neighbours or random peers update interval.

Default: 60000 ms

max_ordinary_broadcast_len: usize

Packets with length bigger than this will be sent using FEC broadcast. See Shard::broadcast

Default: 768 bytes

broadcast_target_count: usize

Max number of peers to distribute broadcast to.

Default: 3

secondary_broadcast_target_count: usize

Max number of peers to redistribute ordinary broadcast to.

Default: 3

secondary_fec_broadcast_target_count: usize

Max number of peers to redistribute FEC broadcast to.

Default: 5

broadcast_wave_len: usize

Number of FEC messages to send in group. There will be a short delay between them.

Default: 20

broadcast_wave_interval_ms: u64

Interval between FEC broadcast waves.

Default: 10 ms

broadcast_timeout_sec: u64

Overlay broadcast timeout. It will be forcefully dropped if not received in this time.

Default: 60 sec

force_compression: bool

Whether requests will be compressed.

Default: false

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the indexed conversion.

Should always be Self

Consumes the current HList and returns an HList with the requested shape. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more