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