rabbitmq

package
v0.0.0-...-c6cd810 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL