systemd

package
v0.0.1-alpha5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package systemd provides the common systemd helper functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion

func CheckVersion() (string, []string, error)

CheckVersion returns the systemd version by running `systemd --version`.

func DaemonReload

func DaemonReload(ctx context.Context) ([]byte, error)

func IsActive

func IsActive(service string) (bool, error)

IsActive returns true if the systemd service is active.

func SystemctlExists

func SystemctlExists() bool

func SystemdExists

func SystemdExists() bool

Types

type DbusConn

type DbusConn struct {
	// contains filtered or unexported fields
}

func NewDbusConn

func NewDbusConn(ctx context.Context) (*DbusConn, error)

Caller should explicitly close the connection by calling Close() on returned connection object

func (*DbusConn) Close

func (c *DbusConn) Close()

func (*DbusConn) IsActive

func (c *DbusConn) IsActive(ctx context.Context, unitName string) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL