systemd

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUnitsDirectory = "/run/fleet/units/"
)

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(mgr *SystemdUnitManager) *EventStream

func (*EventStream) Stream

func (es *EventStream) Stream(sendFunc func(*event.Event), stop chan bool)

type SystemdUnitManager added in v0.4.0

type SystemdUnitManager struct {
	UnitsDir string
	// contains filtered or unexported fields
}

func NewSystemdUnitManager added in v0.4.0

func NewSystemdUnitManager(uDir string) (*SystemdUnitManager, error)

func (*SystemdUnitManager) GetUnitState added in v0.4.0

func (m *SystemdUnitManager) GetUnitState(name string) (*unit.UnitState, error)

GetUnitState generates a UnitState object representing the current state of a Unit

func (*SystemdUnitManager) Load added in v0.4.0

func (m *SystemdUnitManager) Load(name string, u unit.Unit) error

Load writes the given Unit to disk, subscribing to relevant dbus events, and, if necessary, instructing the systemd daemon to reload.

func (*SystemdUnitManager) MarshalJSON added in v0.4.0

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

func (*SystemdUnitManager) Start added in v0.4.0

func (m *SystemdUnitManager) Start(name string)

Start starts the unit identified by the given name

func (*SystemdUnitManager) Stop added in v0.4.0

func (m *SystemdUnitManager) Stop(name string)

Stop stops the unit identified by the given name

func (*SystemdUnitManager) Units added in v0.4.0

func (m *SystemdUnitManager) Units() (units []string, err error)

Units enumerates all files recognized as valid systemd units in this manager's units directory.

func (*SystemdUnitManager) Unload added in v0.4.0

func (m *SystemdUnitManager) Unload(name string)

Unload removes the indicated unit 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