Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmqpProducer ¶
type AmqpProducer struct {
// contains filtered or unexported fields
}
AmqpProducer implements the MessageProducer interface.
func NewAmqpProducer ¶
func NewAmqpProducer(routingKey string, exchangeName string, rabbitMqURL string) *AmqpProducer
NewAmqpProducer creates a new AmqpProducer instance with the given parameters.
func (*AmqpProducer) CloseChannelAndConnection ¶
func (producer *AmqpProducer) CloseChannelAndConnection()
CloseChannelAndConnection closes the channel and connection received in params.
func (*AmqpProducer) OpenChannelAndConnection ¶
func (producer *AmqpProducer) OpenChannelAndConnection()
OpenChannelAndConnection opens a channel and a connection.
func (*AmqpProducer) PublishEntry ¶
func (producer *AmqpProducer) PublishEntry(line models.ParsedLogEntry)
PublishEntry sends the parsed log lines to the message queue.
func (*AmqpProducer) PublishStringMessage ¶
func (producer *AmqpProducer) PublishStringMessage(indexName string)
PublishStringMessage sends a string message to the message queue.
type MessageProducer ¶
type MessageProducer interface { PublishStringMessage(indexName string) PublishEntry(line models.ParsedLogEntry) OpenChannelAndConnection() CloseChannelAndConnection() }
MessageProducer encapsulates methods used to communicate with rabbitMQ server.
Click to show internal directories.
Click to hide internal directories.