Crates.io | psup |
lib.rs | psup |
version | 0.6.0 |
source | src |
created_at | 2021-02-27 04:14:19.493992 |
updated_at | 2021-03-11 04:52:37.21098 |
description | Process supervisor with inter-process communication over tokio Unix sockets |
homepage | |
repository | https://github.com/tmpfs/psup |
max_upload_size | |
id | 361222 |
size | 37,072 |
A non-blocking process supervisor that uses Unix domain sockets for inter-process communication built on tokio. Support will be added later for Windows using named pipes.
It's purpose is primarily to be used as a libary psup-impl but the psup executable can be used for testing or constrained environments where a lightweight executable could be useful. The statically linked release executable is ~2MB with symbols stripped on Linux and could be trimmed down further with a little effort.
Example communicating using JSON RPC:
cargo run --example=supervisor
An example that uses the supervisor control channel to explicitly shutdown a daemon worker process:
cargo run --example=shutdown
To test the daemon and respawn logic:
cargo run -- sample.toml
kill <PID>
Build a release:
cargo build --release && strip target/release/psup