1pub(crate) mod alerts;
8pub(crate) mod config;
9pub(crate) mod loop_impl;
10pub(crate) mod monitor;
11pub(crate) mod state;
12
13pub use config::{WatchConfig, parse_duration};
14pub use loop_impl::run_watch_loop;
15
16#[derive(Debug, thiserror::Error)]
18#[non_exhaustive]
19pub enum WatchError {
20 #[error("invalid interval '{0}': expected format like 30s, 5m, 1h")]
21 InvalidInterval(String),
22
23 #[error("no SBOM files found in watched directories")]
24 NoFilesFound,
25
26 #[error("watch directory does not exist: {}", .0.display())]
27 DirNotFound(std::path::PathBuf),
28
29 #[error("webhook delivery failed: {0}")]
30 WebhookFailed(String),
31}