agglayer_config/
shutdown.rs1use std::time::Duration;
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq)]
6#[serde(rename_all = "kebab-case")]
7pub struct ShutdownConfig {
8 #[serde(default = "default_shutdown_runtime_timeout")]
9 #[serde(with = "crate::with::HumanDuration")]
10 pub runtime_timeout: Duration,
11}
12
13impl Default for ShutdownConfig {
14 fn default() -> Self {
15 Self {
16 runtime_timeout: default_shutdown_runtime_timeout(),
17 }
18 }
19}
20
21const fn default_shutdown_runtime_timeout() -> Duration {
22 Duration::from_secs(5)
23}