Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct {
MqOutput chan<- data.RemoteFragmentDesc
}
Listener is the structure that listens to RabbitMQ and redirects messages to a channel
func NewListener ¶
func NewListener(channel chan<- data.RemoteFragmentDesc) (listener Listener, err error)
NewListener creates a new message queue listener
func (Listener) Start ¶
func (listener Listener) Start()
Start asychronously calls StartBlocking via Gorouting
func (Listener) StartBlocking ¶
func (listener Listener) StartBlocking()
StartBlocking listens on the rabbitMQ messagequeue and redirects messages on the INPUT_QUEUE to a channel
type MqFragmentDesc ¶
type MqFragmentDesc struct {
data.RemoteFragmentDesc
}
mqFragmentDesc is a structure describing an iterum fragment to process coming from the MQ For now it is a copy of RemoteFragmentDesc but extensible for the future
func (*MqFragmentDesc) Deserialize ¶
func (mqfd *MqFragmentDesc) Deserialize(data []byte) (err error)
Deserialize tries to decode a json encoded byte array into `mqfd`. Errors on failure
func (*MqFragmentDesc) Serialize ¶
func (mqfd *MqFragmentDesc) Serialize() (data []byte, err error)
Serialize tries to transform `mqfd` into a json encoded bytearray. Errors on failure
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender is the structure that listens to a channel and redirects messages to rabbitMQ
func NewSender ¶
func NewSender(toSend <-chan data.RemoteFragmentDesc) (sender Sender, err error)
NewSender creates a new sender which receives messages from a channel and sends them on the message queue.
func (Sender) Start ¶
func (sender Sender) Start()
Start asychronously calls StartBlocking via Gorouting
func (Sender) StartBlocking ¶
func (sender Sender) StartBlocking()
StartBlocking listens to the channel, and send remoteFragments to the message queue on the OUTPUT_QUEUE queue.