Documentation ¶
Index ¶
- type Initializer
- func (i *Initializer) GetError() error
- func (i *Initializer) Init(fn func(interface{}) (interface{}, error)) *Initializer
- func (i *Initializer) InitOnSessionBus(fn func(interface{}) (interface{}, error)) *Initializer
- func (i *Initializer) InitOnSystemBus(fn func(interface{}) (interface{}, error)) *Initializer
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 (*Initializer) GetError ¶
func (i *Initializer) GetError() error
GetError returns the first error of initializers.
func (*Initializer) Init ¶
func (i *Initializer) Init(fn func(interface{}) (interface{}, error)) *Initializer
Init accepts a initializer function, and pass the successful return value to next initializer.
func (*Initializer) InitOnSessionBus ¶
func (i *Initializer) InitOnSessionBus(fn func(interface{}) (interface{}, error)) *Initializer
InitOnSessionBus accepts a initializer function which must return a dbus.DBusObject as successful value, and then install this dbus.DBusObject on session bus.
func (*Initializer) InitOnSystemBus ¶
func (i *Initializer) InitOnSystemBus(fn func(interface{}) (interface{}, error)) *Initializer
InitOnSystemBus accepts a initializer function which must return a dbus.DBusObject as successful value, and then install this dbus.DBusObject on system bus.