Giter VIP home page Giter VIP logo

go-systemd's Introduction

go-systemd

Go bindings to systemd. The project has three packages:

  • activation - for writing and using socket activation from Go
  • dbus - for starting/stopping/inspecting running services and units
  • journal - for writing to systemd's logging service, journal
  • unit - for (de)serialization and comparison of unit files
  • machine1 - for registering machines/containers with systemd

Go docs for the entire project are here:

http://godoc.org/github.com/coreos/go-systemd

Socket Activation

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

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

Journal

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

D-Bus

The D-Bus API lets you start, stop and introspect systemd units. The API docs are here:

http://godoc.org/github.com/coreos/go-systemd/dbus

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>

go-systemd's People

Contributors

bcwaldon avatar philips avatar ddfisher avatar jonboulle avatar xiang90 avatar vcaputo avatar yichengq avatar smarterclayton avatar jqln-0 avatar marineam avatar justinsb avatar ghedo avatar crawford avatar alexlarsson avatar rhatdan avatar eyakubovich avatar iaguis avatar jespern avatar jcgregorio avatar dnaeon avatar pcarranzav avatar pquerna avatar vially avatar mischief avatar mscherer avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.