commonware_resolver/p2p/
config.rs1use crate::{p2p::Producer, Consumer};
2use bytes::Bytes;
3use commonware_cryptography::PublicKey;
4use commonware_p2p::{utils::requester, Manager};
5use commonware_utils::Span;
6use std::time::Duration;
7
8pub struct Config<
10 P: PublicKey,
11 D: Manager<PublicKey = P>,
12 Key: Span,
13 Con: Consumer<Key = Key, Value = Bytes, Failure = ()>,
14 Pro: Producer<Key = Key>,
15> {
16 pub manager: D,
18
19 pub consumer: Con,
21
22 pub producer: Pro,
24
25 pub mailbox_size: usize,
27
28 pub requester_config: requester::Config<P>,
30
31 pub fetch_retry_timeout: Duration,
33
34 pub priority_requests: bool,
36
37 pub priority_responses: bool,
39}