Documentation ¶
Index ¶
- Constants
- func NewDBusError(name string, body ...string) *dbus.Error
- func ScrubName(name string) (string, error)
- type Dispatcher
- func (d *Dispatcher) CancelMessage(directive, message_id, cancel_id string) error
- func (d *Dispatcher) Connect() error
- func (d *Dispatcher) DisconnectWorkers()
- func (d *Dispatcher) Dispatch(data yggdrasil.Data) error
- func (d *Dispatcher) EmitEvent(event ipc.DispatcherEvent) error
- func (d *Dispatcher) FlattenDispatchers() map[string]map[string]string
- func (d *Dispatcher) Transmit(sender dbus.Sender, addr string, messageID string, responseTo string, ...) (responseCode int, responseMetadata map[string]string, responseData []byte, ...)
Constants ¶
View Source
const ( TransmitResponseErr int = -1 TransmitResponseOK int = 0 )
Variables ¶
This section is empty.
Functions ¶
func NewDBusError ¶
Types ¶
type Dispatcher ¶
type Dispatcher struct { HTTPClient *internalhttp.Client MessageJournal *messagejournal.MessageJournal Dispatchers chan map[string]map[string]string WorkerEvents chan ipc.WorkerEvent Inbound chan yggdrasil.Data Outbound chan struct { Data yggdrasil.Data Resp chan yggdrasil.Response } // contains filtered or unexported fields }
Dispatcher implements the com.redhat.Yggdrasil1.Dispatcher1 D-Bus interface and is suitable to be exported onto a bus.
Dispatcher receives values on its 'inbound' channel and sends them via D-Bus to the destination worker. It sends values on the 'outbound' channel to relay data received from workers to a remote address.
func NewDispatcher ¶
func NewDispatcher(client *internalhttp.Client) *Dispatcher
func (*Dispatcher) CancelMessage ¶
func (d *Dispatcher) CancelMessage(directive, message_id, cancel_id string) error
CancelMessage implements the dispatching of a cancel message to the worker.
func (*Dispatcher) Connect ¶
func (d *Dispatcher) Connect() error
Connect connects the dispatcher to an appropriate D-Bus broker and begins processing messages received on the inbound channel.
func (*Dispatcher) DisconnectWorkers ¶
func (d *Dispatcher) DisconnectWorkers()
func (*Dispatcher) EmitEvent ¶
func (d *Dispatcher) EmitEvent(event ipc.DispatcherEvent) error
func (*Dispatcher) FlattenDispatchers ¶
func (d *Dispatcher) FlattenDispatchers() map[string]map[string]string
func (*Dispatcher) Transmit ¶
func (d *Dispatcher) Transmit( sender dbus.Sender, addr string, messageID string, responseTo string, metadata map[string]string, data []byte, ) (responseCode int, responseMetadata map[string]string, responseData []byte, responseError *dbus.Error)
Transmit implements the com.redhat.Yggdrasil1.Dispatcher1.Transmit method.
Click to show internal directories.
Click to hide internal directories.