rskit_component/registry_config.rs
1//! Component registry configuration.
2
3use std::time::Duration;
4
5/// Configuration for the component registry.
6#[derive(Debug, Clone)]
7pub struct RegistryConfig {
8 /// Maximum number of components to start in parallel.
9 /// `0` means start all concurrently without any limit.
10 pub concurrency: usize,
11 /// Timeout applied to each component's `start()` call.
12 pub start_timeout: Duration,
13 /// Timeout applied to each component's `stop()` call.
14 pub stop_timeout: Duration,
15}
16
17impl Default for RegistryConfig {
18 fn default() -> Self {
19 Self {
20 concurrency: 1,
21 start_timeout: Duration::from_secs(30),
22 stop_timeout: Duration::from_secs(30),
23 }
24 }
25}