hyprstream_core/systemd/mod.rs
1//! Systemd integration module
2//!
3//! Provides integration with systemd for:
4//! - Signal handling (SIGTERM, SIGINT, SIGHUP)
5//! - Service notification (sd_notify)
6//! - Socket activation
7//! - Health-based watchdog
8//!
9//! # Feature Gating
10//!
11//! Most functionality requires the `systemd` feature flag.
12//! Signal handling works on all Unix systems.
13//!
14//! # Usage
15//!
16//! ```ignore
17//! use hyprstream::systemd::SignalCoordinator;
18//!
19//! // Create coordinator
20//! let coordinator = SignalCoordinator::new();
21//!
22//! // Get receivers for different signal types
23//! let mut shutdown_rx = coordinator.shutdown_receiver();
24//! let mut reload_rx = coordinator.reload_receiver();
25//!
26//! // Spawn signal handler
27//! tokio::spawn(coordinator.run());
28//!
29//! // Wait for shutdown
30//! shutdown_rx.recv().await;
31//! ```
32
33pub mod signals;
34
35#[cfg(feature = "systemd")]
36pub mod notify;
37
38#[cfg(feature = "systemd")]
39pub mod health;
40
41#[cfg(feature = "systemd")]
42pub mod socket;
43
44// Re-export main types
45pub use signals::SignalCoordinator;
46
47#[cfg(feature = "systemd")]
48pub use notify::SystemdNotifier;