Documentation ¶
Index ¶
- Variables
- type EnsureControlInterface
- type Mount
- type NamedUnit
- type SystemdControl
- func (c *SystemdControl) Close()
- func (c *SystemdControl) DaemonReload(ctx context.Context) error
- func (c *SystemdControl) DisableAndStopUnit(ctx context.Context, unitFile string) error
- func (c *SystemdControl) DisableUnit(ctx context.Context, unitFile string) error
- func (c *SystemdControl) DisableUnits(ctx context.Context, unitFiles []string) error
- func (c *SystemdControl) EnableAndStartUnit(ctx context.Context, unitFile string) error
- func (c *SystemdControl) EnableUnit(ctx context.Context, unitFile string) error
- func (c *SystemdControl) EnableUnits(ctx context.Context, unitFiles []string) error
- func (c *SystemdControl) StartUnit(ctx context.Context, unitFile string) error
- func (c *SystemdControl) StopUnit(ctx context.Context, unitFile string) error
- type UnitManager
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotExist = errors.New("unit does not exist")
Functions ¶
This section is empty.
Types ¶
type EnsureControlInterface ¶
type Mount ¶
type SystemdControl ¶
type SystemdControl struct {
// contains filtered or unexported fields
}
func NewSystemdSystemControl ¶
func NewSystemdSystemControl(ctx context.Context) (*SystemdControl, error)
func NewSystemdUserControl ¶
func NewSystemdUserControl(ctx context.Context) (*SystemdControl, error)
func (*SystemdControl) Close ¶
func (c *SystemdControl) Close()
func (*SystemdControl) DaemonReload ¶
func (c *SystemdControl) DaemonReload(ctx context.Context) error
func (*SystemdControl) DisableAndStopUnit ¶
func (c *SystemdControl) DisableAndStopUnit(ctx context.Context, unitFile string) error
func (*SystemdControl) DisableUnit ¶
func (c *SystemdControl) DisableUnit(ctx context.Context, unitFile string) error
func (*SystemdControl) DisableUnits ¶
func (c *SystemdControl) DisableUnits(ctx context.Context, unitFiles []string) error
func (*SystemdControl) EnableAndStartUnit ¶
func (c *SystemdControl) EnableAndStartUnit(ctx context.Context, unitFile string) error
func (*SystemdControl) EnableUnit ¶
func (c *SystemdControl) EnableUnit(ctx context.Context, unitFile string) error
func (*SystemdControl) EnableUnits ¶
func (c *SystemdControl) EnableUnits(ctx context.Context, unitFiles []string) error
type UnitManager ¶
type UnitManager struct {
// contains filtered or unexported fields
}
func NewUnitManager ¶
func NewUnitManager(manager string) *UnitManager
func NewUnitManagerWithPath ¶
func NewUnitManagerWithPath(manager, rootPath string) *UnitManager
func (*UnitManager) EnsureUnits ¶
func (m *UnitManager) EnsureUnits(ctx context.Context, nc *scyllav1alpha1.NodeConfig, recorder record.EventRecorder, requiredUnits []*NamedUnit, control EnsureControlInterface) error
EnsureUnits will make sure to remove any unit that is no longer desired and create/update those that are.
func (*UnitManager) GetUnitPath ¶
func (m *UnitManager) GetUnitPath(name string) string
func (*UnitManager) ReadStatus ¶
func (m *UnitManager) ReadStatus() (*unitManagerStatus, error)
func (*UnitManager) WriteStatus ¶
func (m *UnitManager) WriteStatus(status *unitManagerStatus) error
Click to show internal directories.
Click to hide internal directories.