systemd

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2014 License: Apache-2.0 Imports: 12 Imported by: 66

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventStream

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

func NewEventStream

func NewEventStream() *EventStream

func (*EventStream) Close

func (es *EventStream) Close()

func (*EventStream) Stream

func (es *EventStream) Stream(unitchan <-chan map[string]*dbus.UnitStatus, eventchan chan *event.Event)

type SystemdManager

type SystemdManager struct {
	Systemd *dbus.Conn
	Machine *machine.Machine
	// contains filtered or unexported fields
}

func NewSystemdManager

func NewSystemdManager(machine *machine.Machine) (*SystemdManager, error)

func (*SystemdManager) GetUnitState added in v0.3.0

func (m *SystemdManager) GetUnitState(jobName string) (*unit.UnitState, error)

GetUnitState generates a UnitState object representing the current state of a Job's unit

func (*SystemdManager) LoadJob added in v0.3.0

func (m *SystemdManager) LoadJob(job *job.Job)

LoadJob writes the unit of the given Job to disk, subscribes to relevant dbus events, and only if necessary, instructs the systemd daemon to reload

func (*SystemdManager) MarshalJSON added in v0.2.0

func (m *SystemdManager) MarshalJSON() ([]byte, error)

func (*SystemdManager) Publish

func (m *SystemdManager) Publish(bus *event.EventBus, stopchan chan bool)

Publish is a long-running function that streams dbus events through a translation layer and on to the EventBus

func (*SystemdManager) StartJob

func (m *SystemdManager) StartJob(jobName string)

StartJob starts the unit created for the indicated Job

func (*SystemdManager) StopJob

func (m *SystemdManager) StopJob(jobName string)

StopJob stops the unit created for the indicated Job

func (*SystemdManager) UnloadJob added in v0.3.0

func (m *SystemdManager) UnloadJob(jobName string)

UnloadJob removes the unit associated with the indicated Job from the filesystem, unsubscribing from relevant dbus events

Jump to

Keyboard shortcuts

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