systemd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConn

func NewConn() (*dbus.Conn, error)

NewConn establishes a new connection to D-Bus

Types

type Client

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

Client represents systemd D-Bus API client.

func NewClient

func NewClient(conn *dbus.Conn) *Client

NewClient creates new Client object

func (*Client) ListTimers

func (c *Client) ListTimers() ([]*Timer, error)

ListTimers returns installed systemd timers

type Timer

type Timer struct {
	Name              string    `json:"name"`
	Schedule          string    `json:"schedule"`
	LastTriggered     time.Time `json:"last_triggered"`
	NextElapse        time.Time `json:"next_elapse"`
	Result            string    `json:"result"`
	Active            bool      `json:"active"`
	LastExecutionTime uint64    `json:"last_execution_time"`
}

Timer represents systemd timer

func NewTimer

func NewTimer(name string) *Timer

NewTimer creates new Timer object

func (*Timer) ServiceName

func (t *Timer) ServiceName() string

ServiceName returns service unit name

func (*Timer) TimerName

func (t *Timer) TimerName() string

TimerName returns timer unit name

Jump to

Keyboard shortcuts

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