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;
14mod r#type;
15
16pub use {r#struct::*, r#type::*};
17
18use r#const::*;
19
20use 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
29use tokio::runtime::Runtime;