pub struct Opts {
pub identity: Arc<NodeKey>,
pub realm_trust: HashMap<[u8; 32], Vec<u8>>,
pub replication_factor: usize,
pub respawn_delay: Duration,
pub max_seeds: usize,
pub max_direct_links: usize,
pub connect_timeout: Duration,
pub admission: Option<AdmissionLimits>,
pub link_selection: LinkSelection,
pub kem_advertise: bool,
pub on_link_event: Option<Arc<dyn Fn(LinkEvent) + Send + Sync>>,
pub on_issuer_error: Option<Arc<dyn Fn(IssuerError) + Send + Sync>>,
}Expand description
A pool’s configuration. Opts::new gives macula’s defaults; a zero
bound also means its default.
Fields§
§identity: Arc<NodeKey>The node’s identity key; its profile is the pool’s.
realm_trust: HashMap<[u8; 32], Vec<u8>>Each realm’s key as carried: an advertisement in a realm is trusted only when its authorization verifies against it, and an org procedure is served only in a realm it names.
replication_factor: usize§respawn_delay: Duration§max_seeds: usize§max_direct_links: usize§connect_timeout: DurationHow long Pool::connect waits for a first link.
admission: Option<AdmissionLimits>Bounds on the requests the node’s served procedures take; None is
macula’s defaults, with the cap one share per link the pool may hold.
link_selection: LinkSelection§kem_advertise: boolGives the node a KEM keyring and names its current key in the advertisements of procedures served confidentially (macula 13, E2E design amendment A1), so callers seal to it. Off by default: switch it on only once every station runs macula 12.11 or later and every caller runs 13. Without it the node opens no sealed request.
on_link_event: Option<Arc<dyn Fn(LinkEvent) + Send + Sync>>Hears every link coming up and going down, on a task of its own.
on_issuer_error: Option<Arc<dyn Fn(IssuerError) + Send + Sync>>Hears each failure to reissue the node’s status statements or rotate
its CONNECT key; None writes it to stderr. Left failing, the links
end when their statements lapse.