Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Initializer ¶
type Initializer struct {
// contains filtered or unexported fields
}
Initializer is a chainable initializer. Init/InitOnSystemBus/InitOnSystemBus will accept a initializer, and then pass the successful return value to the next initializer. If error occurs, the rest initializers won't be executed any more. GetError is used to access the error.
func DoWithSessionBus ¶
func DoWithSessionBus(fn func() (dbus.DBusObject, error)) *Initializer
DoWithSessionBus starts the initialization and install dbus object to sesison bus.
func DoWithSystemBus ¶
func DoWithSystemBus(fn func() (dbus.DBusObject, error)) *Initializer
DoWithSystemBus starts the initialization and install dbus object to system bus.
func (*Initializer) Do ¶
func (i *Initializer) Do(fn func() error) *Initializer
Do accepts a initializer function, stop other Do if any error occurs.
func (*Initializer) DoWithSessionBus ¶
func (i *Initializer) DoWithSessionBus(fn func() (dbus.DBusObject, error)) *Initializer
DoWithSessionBus starts the initialization and install dbus object to session bus.
func (*Initializer) DoWithSystemBus ¶
func (i *Initializer) DoWithSystemBus(fn func() (dbus.DBusObject, error)) *Initializer
DoWithSystemBus starts the initialization and install dbus object to system bus.
func (*Initializer) GetError ¶
func (i *Initializer) GetError() error
GetError returns the first error of initializers.