Skip to content

matthewpi/sd

Repository files navigation

Systemd

Godoc Reference Pipeline Status

Go package that provides functions to interating with systemd features.

Features

  • systemd notify - sd_notify (Type=notify and Type=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.

Installation

go get github.com/matthewpi/sd

Usage

sdlisten

See sdlisten/example_test.go or the Godoc reference for examples and usage.

sdnotify

See sdnotify/example_test.go or the Godoc reference for examples and usage.

Licensing

All code in this repository is licensed under the MIT license.

This package includes ZERO external dependencies, including any golang.org/x packages.

About

Go package that provides functions to interating with systemd features.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published