rabbitmq

package
v0.0.0-...-cfd3dd9 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEFAULT_CANNED_INPUT_LOCATION = "test/stress_rabbit/zipbundles/bundleone"

Functions

func RunCannedData

func RunCannedData(mockCon MockAMQPConnection, cannedInputLocation *string)

Types

type AMQPChannel

type AMQPChannel interface {
	Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error)
	Cancel(consumer string, noWait bool) error
	QueueBind(name, key, exchange string, noWait bool, args amqp.Table) error
	QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error)
	Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
	Close() error
}

type AMQPConnection

type AMQPConnection interface {
	Close() error
	NotifyClose(receiver chan *amqp.Error) chan *amqp.Error
	Channel() (AMQPChannel, error)
}

type AMQPDialer

type AMQPDialer interface {
	Dial(string) (AMQPConnection, error)
	DialTLS(string, *tls.Config) (AMQPConnection, error)
}

type Consumer

type Consumer struct {
	ConnectionErrors chan *amqp.Error
	// contains filtered or unexported fields
}

* AMQP bookkeeping

ZE 2019 - Improved Consumer struct

func NewConsumer

func NewConsumer(amqpURI, queueName, ctag string, bindToRawExchange bool,
	routingKeys []string, dialer AMQPDialer, tlsCfg *tls.Config) *Consumer

func NewConsumerWithTlsCfg

func NewConsumerWithTlsCfg(amqpURI, queueName, ctag string, bindToRawExchange bool,
	routingKeys []string, dialer AMQPDialer, tlsCfg *tls.Config) *Consumer

func (*Consumer) Connect

func (c *Consumer) Connect() (deliveries <-chan amqp.Delivery, err error)

func (*Consumer) DialAMQP

func (c *Consumer) DialAMQP() error

func (*Consumer) Shutdown

func (c *Consumer) Shutdown() error

type MockAMQPChannel

type MockAMQPChannel struct {
	Closed bool
	Queues []MockAMQPQueue
	sync.RWMutex
}

func (MockAMQPChannel) Cancel

func (mock MockAMQPChannel) Cancel(consumer string, noWait bool) error

func (*MockAMQPChannel) Close

func (mock *MockAMQPChannel) Close() error

func (MockAMQPChannel) Consume

func (mock MockAMQPChannel) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error)

func (*MockAMQPChannel) Publish

func (mock *MockAMQPChannel) Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error

func (*MockAMQPChannel) QueueBind

func (mock *MockAMQPChannel) QueueBind(name, key, exchange string, noWait bool, args amqp.Table) error

func (*MockAMQPChannel) QueueDeclare

func (mock *MockAMQPChannel) QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error)

type MockAMQPConnection

type MockAMQPConnection struct {
	AMQPURL  string
	AMQPCHAN *MockAMQPChannel
	// contains filtered or unexported fields
}

func (*MockAMQPConnection) Channel

func (mock *MockAMQPConnection) Channel() (AMQPChannel, error)

func (MockAMQPConnection) Close

func (mock MockAMQPConnection) Close() error

func (MockAMQPConnection) NotifyClose

func (mock MockAMQPConnection) NotifyClose(receiver chan *amqp.Error) chan *amqp.Error

type MockAMQPDialer

type MockAMQPDialer struct {
	Connection MockAMQPConnection
}

func NewMockAMQPDialer

func NewMockAMQPDialer() MockAMQPDialer

func (MockAMQPDialer) Dial

func (mdial MockAMQPDialer) Dial(s string) (AMQPConnection, error)

func (MockAMQPDialer) DialTLS

func (mdial MockAMQPDialer) DialTLS(s string, tlscfg *tls.Config) (AMQPConnection, error)

type MockAMQPQueue

type MockAMQPQueue struct {
	Name           string
	Deliveries     chan amqp.Delivery
	BoundExchanges map[string][]string
}

func (*MockAMQPQueue) String

func (mock *MockAMQPQueue) String() string

type StreadwayAMQPDialer

type StreadwayAMQPDialer struct {
}

func (StreadwayAMQPDialer) Dial

func (StreadwayAMQPDialer) DialTLS

func (sdial StreadwayAMQPDialer) DialTLS(s string, tlscfg *tls.Config) (AMQPConnection, error)

type WrappedAMQPChannel

type WrappedAMQPChannel struct {
	*amqp.Channel
}

type WrappedAMQPConnection

type WrappedAMQPConnection struct {
	*amqp.Connection
}

func (WrappedAMQPConnection) Channel

func (wrappedcon WrappedAMQPConnection) Channel() (AMQPChannel, error)

Jump to

Keyboard shortcuts

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