systemd

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2014 License: Apache-2.0 Imports: 10 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 *SystemdManager) *EventStream

func (*EventStream) Stream

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

type SystemdManager

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

func NewSystemdManager

func NewSystemdManager(uDir string) (*SystemdManager, error)

func (*SystemdManager) GetUnitState added in v0.3.0

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

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

func (*SystemdManager) Load added in v0.3.1

func (m *SystemdManager) 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 (*SystemdManager) MarshalJSON added in v0.2.0

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

func (*SystemdManager) Start added in v0.3.1

func (m *SystemdManager) Start(name string)

Start starts the unit identified by the given name

func (*SystemdManager) Stop added in v0.3.1

func (m *SystemdManager) Stop(name string)

Stop stops the unit identified by the given name

func (*SystemdManager) Units added in v0.3.1

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

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

func (*SystemdManager) Unload added in v0.3.1

func (m *SystemdManager) 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