commonware_broadcast/buffered/config.rs
1use commonware_cryptography::PublicKey;
2use commonware_p2p::Provider;
3use std::num::NonZeroUsize;
4
5/// Configuration for the [super::Engine].
6pub struct Config<P: PublicKey, MCfg, D: Provider<PublicKey = P>> {
7 /// The public key of the participant.
8 pub public_key: P,
9
10 /// The maximum size of the mailbox backlog.
11 pub mailbox_size: NonZeroUsize,
12
13 /// The maximum number of cached items per sender.
14 pub deque_size: usize,
15
16 /// Whether messages are sent over the network as priority.
17 pub priority: bool,
18
19 /// The configuration for the codec item.
20 pub codec_config: MCfg,
21
22 /// Provider for peer set changes (eviction follows latest primary; see [`buffered`](super)).
23 pub peer_provider: D,
24}