Documentation ¶
Index ¶
- Constants
- type EventStream
- type SystemdUnitManager
- func (m *SystemdUnitManager) GetUnitState(name string) (*unit.UnitState, error)
- func (m *SystemdUnitManager) Load(name string, u unit.Unit) error
- func (m *SystemdUnitManager) MarshalJSON() ([]byte, error)
- func (m *SystemdUnitManager) Start(name string)
- func (m *SystemdUnitManager) Stop(name string)
- func (m *SystemdUnitManager) Units() (units []string, err error)
- func (m *SystemdUnitManager) Unload(name string)
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
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.
Click to show internal directories.
Click to hide internal directories.