[−][src]Crate sd_notify
Lightweight crate for interacting with systemd
.
This crate can be used to send service readiness or state change notifications
to systemd
or compatible service managers. It doesn't offer the full
functionality of libsystemd
, but is pure-Rust and has no dependencies.
For bindings to the native libsystemd
library, see the systemd
crate. For a more complete Rust reimplementation of libsystemd
API, see the
libsystemd
crate.
The notification mechanism involves sending a datagram to a Unix domain socket.
See sd_notify(3)
for details.
Example
let _ = sd_notify::notify(true, &[NotifyState::Ready]);
Enums
NotifyState | Daemon notification for the service manager. |
Functions
booted | Checks whether the system has been booted by |
notify | Sends the service manager a list of state changes. |