Documentation ¶
Index ¶
- func AssertEqualConsumption(actual *models.ConsumtionValue, expected *models.ConsumtionValue, t *testing.T, ...)
- func AssertEqualIndex(actual *models.IndexValue, expected *models.IndexValue, t *testing.T, ...)
- func AssertEqualSmcData(actual *models.SmcData, expected *models.SmcData, t *testing.T, testIndex int)
- func AssertEqualSmcEvent(actual *models.SmcEvent, expected *models.SmcEvent, t *testing.T, ...)
- type TestRabbitConsumer
- type TestRabbitMqProducer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqualConsumption ¶
func AssertEqualConsumption( actual *models.ConsumtionValue, expected *models.ConsumtionValue, t *testing.T, testIndex int)
AssertEqualConsumption fails the test if the given consumption values are not equal.
func AssertEqualIndex ¶
func AssertEqualIndex(actual *models.IndexValue, expected *models.IndexValue, t *testing.T, testIndex int)
AssertEqualIndex fails the test if the given index values are not equal.
Types ¶
type TestRabbitConsumer ¶
type TestRabbitConsumer struct {
// contains filtered or unexported fields
}
func NewTestRabbitConsumer ¶
func NewTestRabbitConsumer( hostURL string, routingKey string, exchangeName string, queueName string) *TestRabbitConsumer
Creates a new TestRabbitConsumer.
func (*TestRabbitConsumer) CloseConnectionAndChannel ¶
func (c *TestRabbitConsumer) CloseConnectionAndChannel()
CloseConnection closes the connection.
func (*TestRabbitConsumer) Connect ¶
func (c *TestRabbitConsumer) Connect()
Connect initializes a connection.
func (*TestRabbitConsumer) ConsumeMessages ¶
func (c *TestRabbitConsumer) ConsumeMessages() <-chan amqp.Delivery
ConsumeMessages consumes messages from rabbitmq, returns the deliveries.
type TestRabbitMqProducer ¶
type TestRabbitMqProducer struct {
// contains filtered or unexported fields
}
TestRabbitMqProducer implements the MessageProducer interface.
func NewTestProducer ¶
func NewTestProducer( rabbitMqURL string, exchangeName string, routingKey string) *TestRabbitMqProducer
NewTestProducer creates a new message producer that publishes messages to rabbitmq.
func (*TestRabbitMqProducer) CloseChannelAndConnection ¶
func (producer *TestRabbitMqProducer) CloseChannelAndConnection()
CloseChannelAndConnection closes the channel and connection received in params.
func (*TestRabbitMqProducer) Connect ¶
func (producer *TestRabbitMqProducer) Connect()
OpenChannelAndConnection opens a channel and a connection.
func (*TestRabbitMqProducer) PublishEntry ¶
func (producer *TestRabbitMqProducer) PublishEntry(line parsermodels.ParsedLogEntry)
PublishEntry sends the parsed log lines to the message queue.
func (*TestRabbitMqProducer) PublishStringMessage ¶
func (producer *TestRabbitMqProducer) PublishStringMessage(message string)
PublishStringMessage sends a string message to the message queue.