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