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 cfg;
12pub(crate) mod manager;
13
14pub use manager::{r#struct::*, r#type::*};
15
16pub(crate) use manager::r#const::*;
17
18pub(crate) use std::{
19 fs,
20 future::Future,
21 path::{Path, PathBuf},
22 pin::Pin,
23 process::{Child, Command, ExitStatus, Output, Stdio, exit, id},
24 sync::Arc,
25};
26
27#[cfg(windows)]
28pub(crate) use tokio::runtime::Runtime;
29
30#[cfg(not(windows))]
31pub(crate) use tokio::runtime::Runtime;