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