tmkms/config/chain/hook.rs
1use serde::Deserialize;
2use std::ffi::OsString;
3
4/// Configuration for a particular hook to invoke
5#[derive(Default, Deserialize, Debug)]
6#[serde(deny_unknown_fields)]
7pub struct HookConfig {
8 /// Command (with arguments) to invoke
9 pub cmd: Vec<OsString>,
10
11 /// Timeout (in seconds) to wait when executing the command (default 5)
12 pub timeout_secs: Option<u64>,
13
14 /// Whether or not to fail open or closed if this command fails to execute.
15 /// Failing closed will prevent the KMS from starting if this command fails.
16 pub fail_closed: bool,
17}