Documentation ¶
Index ¶
- func AssertAMQPMessageCount[T any](tb testing.TB, queueName string, expectedCount int, cfg connection.Config, ...) []T
- func ConsumeAMQPMessages[T any](tb testing.TB, queueName string, cfg connection.Config, ...) []T
- func GetAMQPConnection(tb testing.TB, cfg connection.Config) (*amqp091.Connection, *amqp091.Channel)
- func PublishAMQPMessage(tb testing.TB, exchange string, msg any, conn connection.Config, ...)
- type ConsumerConfig
- type PublishConfig
- type PublisherConfig
- type QueueExchangeMapping
- func (q *QueueExchangeMapping) AddMapping(exchange string, queue ...string) *QueueExchangeMapping
- func (q *QueueExchangeMapping) AddMappingConfig(exchangeCfg PublisherConfig, queue ConsumerConfig) *QueueExchangeMapping
- func (q *QueueExchangeMapping) AddMappings(exchangeCfg PublisherConfig, queue []ConsumerConfig) *QueueExchangeMapping
- func (q QueueExchangeMapping) Exchange(prefix string) string
- func (q QueueExchangeMapping) Queue(prefix string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertAMQPMessageCount ¶
func ConsumeAMQPMessages ¶
func GetAMQPConnection ¶
func GetAMQPConnection(tb testing.TB, cfg connection.Config) (*amqp091.Connection, *amqp091.Channel)
func PublishAMQPMessage ¶
func PublishAMQPMessage( tb testing.TB, exchange string, msg any, conn connection.Config, config ...PublishConfig, )
Types ¶
type ConsumerConfig ¶
type ConsumerConfig struct { Name string Config consumer.QueueDeclare }
type PublishConfig ¶
type PublisherConfig ¶
type PublisherConfig struct { Name string Config publisher.ExchangeDeclare }
type QueueExchangeMapping ¶
type QueueExchangeMapping struct {
// contains filtered or unexported fields
}
func NewMappings ¶
func NewMappings(tb testing.TB, config ...connection.Config) *QueueExchangeMapping
func (*QueueExchangeMapping) AddMapping ¶
func (q *QueueExchangeMapping) AddMapping(exchange string, queue ...string) *QueueExchangeMapping
func (*QueueExchangeMapping) AddMappingConfig ¶
func (q *QueueExchangeMapping) AddMappingConfig(exchangeCfg PublisherConfig, queue ConsumerConfig) *QueueExchangeMapping
func (*QueueExchangeMapping) AddMappings ¶
func (q *QueueExchangeMapping) AddMappings(exchangeCfg PublisherConfig, queue []ConsumerConfig) *QueueExchangeMapping
func (QueueExchangeMapping) Exchange ¶
func (q QueueExchangeMapping) Exchange(prefix string) string
func (QueueExchangeMapping) Queue ¶
func (q QueueExchangeMapping) Queue(prefix string) string
Click to show internal directories.
Click to hide internal directories.