All Projects → coreos → Go Systemd

coreos / Go Systemd

Licence: apache-2.0
Go bindings to systemd socket activation, journal, D-Bus, and unit files

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Go Systemd

InitWare
The InitWare Suite of Middleware allows you to manage services and system resources as logical entities called units. Its main component is a service management ("init") system.
Stars: ✭ 164 (-90.66%)
Mutual labels:  systemd, dbus
node-systemd-journald
Native bindings to journald
Stars: ✭ 26 (-98.52%)
Mutual labels:  systemd, journald
Zabbix Module Systemd
Native systemd monitoring for Zabbix
Stars: ✭ 81 (-95.39%)
Mutual labels:  dbus, systemd
ocaml-systemd
OCaml module for native access to the systemd facilities
Stars: ✭ 22 (-98.75%)
Mutual labels:  systemd, journald
lua-systemd
Systemd bindings for Lua
Stars: ✭ 33 (-98.12%)
Mutual labels:  systemd, dbus
java-systemd
Java access to systemd via D-Bus
Stars: ✭ 32 (-98.18%)
Mutual labels:  systemd, dbus
Systemd Named Netns
Use named netns (net namespace) with systemd services!
Stars: ✭ 63 (-96.41%)
Mutual labels:  systemd
Systemdlogger
Exports systemd logs to an external service, eg cloudwatch, elasticsearch
Stars: ✭ 91 (-94.82%)
Mutual labels:  systemd
Mkinitcpio Systemd Tool
Provisioning tool for systemd in initramfs (systemd-tool)
Stars: ✭ 60 (-96.58%)
Mutual labels:  systemd
Systemctl Php
PHP wrapper for systemctl
Stars: ✭ 54 (-96.92%)
Mutual labels:  systemd
Capistrano Mb
[unmaintained] Capistrano tasks for deploying Rails from scratch to Ubuntu 16.04 and 18.04
Stars: ✭ 117 (-93.34%)
Mutual labels:  systemd
Log2ram
ramlog like for systemd (Put log into a ram folder)
Stars: ✭ 1,751 (-0.28%)
Mutual labels:  systemd
Localslackirc
IRC gateway for slack, running on localhost for one user
Stars: ✭ 84 (-95.22%)
Mutual labels:  systemd
Gnome Shell Extension Services Systemd
Gnome Shell Extension that allows to start and stop systemd services
Stars: ✭ 68 (-96.13%)
Mutual labels:  systemd
Python Dbus Next
🚌 The next great DBus library for Python with asyncio support
Stars: ✭ 95 (-94.59%)
Mutual labels:  dbus
Sway De
🏠 Sway desktop environment dotfile installation for Arch Linux
Stars: ✭ 63 (-96.41%)
Mutual labels:  systemd
Qmlnotify
Awesome notification server in QML
Stars: ✭ 114 (-93.51%)
Mutual labels:  dbus
Vim Systemd Syntax
Syntax highlighting for systemd service files in Vim.
Stars: ✭ 57 (-96.75%)
Mutual labels:  systemd
Sleepto
An alternative to traditional task schedulers
Stars: ✭ 98 (-94.42%)
Mutual labels:  systemd
Hassctl
Simple command line utility to help debug Home Assistant configuration
Stars: ✭ 77 (-95.62%)
Mutual labels:  systemd

go-systemd

godoc minimum golang 1.12

Go bindings to systemd. The project has several packages:

  • activation - for writing and using socket activation from Go
  • daemon - for notifying systemd of service status changes
  • dbus - for starting/stopping/inspecting running services and units
  • journal - for writing to systemd's logging service, journald
  • sdjournal - for reading from journald by wrapping its C API
  • login1 - for integration with the systemd logind API
  • machine1 - for registering machines/containers with systemd
  • unit - for (de)serialization and comparison of unit files

Socket Activation

An example HTTP server using socket activation can be quickly set up by following this README on a Linux machine running systemd:

https://github.com/coreos/go-systemd/tree/main/examples/activation/httpserver

systemd Service Notification

The daemon package is an implementation of the sd_notify protocol. It can be used to inform systemd of service start-up completion, watchdog events, and other status changes.

D-Bus

The dbus package connects to the systemd D-Bus API and lets you start, stop and introspect systemd units. API documentation is available online.

Debugging

Create /etc/dbus-1/system-local.conf that looks like this:

<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
    <policy user="root">
        <allow eavesdrop="true"/>
        <allow eavesdrop="true" send_destination="*"/>
    </policy>
</busconfig>

Journal

Writing to the Journal

Using the pure-Go journal package you can submit journal entries directly to systemd's journal, taking advantage of features like indexed key/value pairs for each log entry.

Reading from the Journal

The sdjournal package provides read access to the journal by wrapping around journald's native C API; consequently it requires cgo and the journal headers to be available.

logind

The login1 package provides functions to integrate with the systemd logind API.

machined

The machine1 package allows interaction with the systemd machined D-Bus API.

Units

The unit package provides various functions for working with systemd unit files.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].