Documentation ¶
Index ¶
- type Action
- type DBus
- func (d *DBus) DaemonReload(_ context.Context) error
- func (d *DBus) Disable(_ context.Context, unitNames ...string) error
- func (d *DBus) Enable(_ context.Context, unitNames ...string) error
- func (d *DBus) Reboot() error
- func (d *DBus) Restart(_ context.Context, _ record.EventRecorder, _ runtime.Object, unitName string) error
- func (d *DBus) Start(_ context.Context, _ record.EventRecorder, _ runtime.Object, unitName string) error
- func (d *DBus) Stop(_ context.Context, _ record.EventRecorder, _ runtime.Object, unitName string) error
- type SystemdAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action int
Action is an int type alias.
const ( // ActionDaemonReload is constant for the 'DaemonReload' action. ActionDaemonReload Action = iota // ActionDisable is constant for the 'Disable' action. ActionDisable // ActionEnable is constant for the 'Enable' action. ActionEnable // ActionRestart is constant for the 'Restart' action. ActionRestart // ActionStart is constant for the 'Start' action. ActionStart // ActionStop is constant for the 'Stop' action. ActionStop // ActionReboot is constant for the 'Reboot' action. ActionReboot )
type DBus ¶
type DBus struct { Actions []SystemdAction // contains filtered or unexported fields }
DBus is a fake implementation for the dbus.DBus interface.
func New ¶
func New() *DBus
New returns a simple implementation of dbus.DBus which can be used to fake the dbus actions in unit tests.
func (*DBus) DaemonReload ¶
DaemonReload implements dbus.DBus.
func (*DBus) Restart ¶
func (d *DBus) Restart(_ context.Context, _ record.EventRecorder, _ runtime.Object, unitName string) error
Restart implements dbus.DBus.
type SystemdAction ¶
SystemdAction is used for the implementation of the fake dbus.
Click to show internal directories.
Click to hide internal directories.