Documentation
¶
Overview ¶
Package dbus provides D-Bus clients for system services used by the supervisor.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logind ¶
type Logind interface {
// PowerOff triggers an immediate system shutdown.
PowerOff(ctx context.Context) error
// Reboot triggers an immediate system reboot.
Reboot(ctx context.Context) error
}
Logind controls system power state via the systemd-logind D-Bus interface. All operations are issued without an authentication prompt.
type RAUC ¶
type RAUC interface {
// Status returns the current system compatibility, boot slot, and the
// state of all configured slots.
Status(ctx context.Context) (RAUCStatus, error)
// Install installs the bundle at filename. It blocks until RAUC signals
// completion, so the caller should pass a context unaffected by client
// disconnection if the installation must not be interrupted.
Install(ctx context.Context, filename string) error
}
RAUC manages OS bundle installation via the RAUC D-Bus interface.
type RAUCSlot ¶
type RAUCSlot struct {
Name string `json:"name"`
Class string `json:"class"`
Device string `json:"device"`
Type string `json:"type"`
Bootname string `json:"bootname"`
State string `json:"state"`
SHA256 string `json:"sha256,omitempty"`
Size uint64 `json:"size,omitempty"`
}
RAUCSlot describes the state of a single RAUC slot.
type RAUCStatus ¶
type RAUCStatus struct {
Compatible string `json:"compatible"`
Variant string `json:"variant"`
BootSlot string `json:"booted"`
Slots []RAUCSlot `json:"slots"`
}
RAUCStatus describes the overall system status reported by RAUC.
type System ¶
type System struct {
// contains filtered or unexported fields
}
System holds D-Bus clients for system services and owns the underlying connection.
func New ¶
New connects to the system D-Bus and returns a System ready for use. Call Close when the System is no longer needed.
func NewWithConn ¶
NewWithConn returns a System using an existing D-Bus connection. It is intended for use in tests.