watermillamqptest

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPubSub

func NewPubSub(
	tb watermilltest.TestingTB,
	conn *amqp.ConnectionWrapper,
	queueNameGenerator amqp.QueueNameGenerator,
	exchangeAndRoutingKeyNameGenerator TopicNameGenerator,
) (*amqp.Publisher, *amqp.Subscriber)

Types

type RabbitMQ

type RabbitMQ struct {
	// contains filtered or unexported fields
}

func NewRabbitMQ

func NewRabbitMQ(pool *dockertest.Pool, opts ...RabbitMQOption) (*RabbitMQ, error)

NewRabbitMQ constructs a new RabbitMQ resource. If the env variable 'TESTS_RABBITMQ_CONNECTION_STRING' is set, this function doesn't run a new Docker container and uses the value of this variable as a connection string, otherwise this function runs a new RabbitMQ instance in a Docker container. This function is intended for use in TestMain.

func (*RabbitMQ) Close

func (rmq *RabbitMQ) Close() error

func (*RabbitMQ) NewConnection

func (rmq *RabbitMQ) NewConnection(tb watermilltest.TestingTB) *amqp.ConnectionWrapper

type RabbitMQOption

type RabbitMQOption func(cfg *rabbitMQConfig)

func WithRabbitMQImage

func WithRabbitMQImage(image string) RabbitMQOption

func WithRabbitMQTTL

func WithRabbitMQTTL(ttlSeconds uint) RabbitMQOption

type TopicNameGenerator

type TopicNameGenerator amqp.QueueNameGenerator

Jump to

Keyboard shortcuts

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