server_manager/
lib.rs

1//! server-manager
2//!
3//! server-manager is a rust library for managing server processes.
4//! It encapsulates service startup, shutdown, and background daemon mode.
5//! Users can specify the PID file, log file paths, and other configurations
6//! through custom settings, while also passing in their own asynchronous
7//! server function for execution. The library supports both synchronous
8//! and asynchronous operations. On Unix and Windows platforms,
9//! it enables background daemon processes.
10
11pub(crate) mod r#const;
12pub(crate) mod r#impl;
13pub(crate) mod r#struct;
14pub(crate) mod r#type;
15
16#[cfg(test)]
17mod test;
18
19pub use {r#struct::*, r#type::*};
20
21pub(crate) use r#const::*;
22
23pub(crate) use std::{
24    fs,
25    future::Future,
26    path::{Path, PathBuf},
27    pin::Pin,
28    process::{Child, Command, ExitStatus, Output, Stdio, exit, id},
29    sync::Arc,
30};
31
32pub(crate) use tokio::runtime::Runtime;
33
34#[cfg(test)]
35pub(crate) use std::time::Duration;