ic_agent/agent/
agent_config.rsuse crate::{
agent::{NonceFactory, NonceGenerator, Transport},
identity::{anonymous::AnonymousIdentity, Identity},
};
use std::{sync::Arc, time::Duration};
pub struct AgentConfig {
pub nonce_factory: Arc<dyn NonceGenerator>,
pub identity: Arc<dyn Identity>,
pub ingress_expiry: Option<Duration>,
pub transport: Option<Arc<dyn Transport>>,
pub verify_query_signatures: bool,
pub max_concurrent_requests: usize,
}
impl Default for AgentConfig {
fn default() -> Self {
Self {
nonce_factory: Arc::new(NonceFactory::random()),
identity: Arc::new(AnonymousIdentity {}),
ingress_expiry: None,
transport: None,
verify_query_signatures: true,
max_concurrent_requests: 50,
}
}
}