Go package that provides functions to interating with systemd features.
- systemd notify -
sd_notify
(Type=notify
andType=notify-reload
)- Allows applications to notify systemd about it's status, useful for ensuring systemd knows when a service actually starts or indicating status details.
- Support for watchdogs to ensure applications are still alive, similar to a Kubernetes readiness probe.
- systemd sockets
- Allows applications to bind to privileged ports without privileges.
- Support for socket-activation to allow applications to be started automatically when an incoming connection comes in.
- Simplifies binding to unix sockets as an application doesn't need special logic to handle it, instead just binds to a listener, the same as if a port was being used.
go get github.com/matthewpi/sd
See sdlisten/example_test.go
or the Godoc reference for examples and usage.
See sdnotify/example_test.go
or the Godoc reference for examples and usage.
All code in this repository is licensed under the MIT license.
This package includes ZERO external dependencies, including any golang.org/x
packages.