Documentation
¶
Index ¶
- type Channel
- func (_m *Channel) Close() error
- func (_m *Channel) Consume(queue string, consumer string, autoAck bool, exclusive bool, noLocal bool, ...) (<-chan amqp091.Delivery, error)
- func (_m *Channel) ExchangeDeclare(name string, kind string, durable bool, autoDelete bool, internal bool, ...) error
- func (_m *Channel) NotifyClose(receiver chan *amqp091.Error) chan *amqp091.Error
- func (_m *Channel) Publish(exchange string, key string, mandatory bool, immediate bool, ...) error
- func (_m *Channel) Qos(prefetchCount int, prefetchSize int, global bool) error
- func (_m *Channel) QueueBind(name string, key string, exchange string, noWait bool, args amqp091.Table) error
- func (_m *Channel) QueueDeclare(name string, durable bool, autoDelete bool, exclusive bool, noWait bool, ...) (amqp091.Queue, error)
- type ChannelSimple
- func (c *ChannelSimple) Close() error
- func (c *ChannelSimple) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, ...) (<-chan amqp.Delivery, error)
- func (c *ChannelSimple) ExchangeDeclare(name, kind string, durable, autoDelete, internal, noWait bool, args amqp.Table) error
- func (c *ChannelSimple) NotifyClose(receiver chan *amqp.Error) chan *amqp.Error
- func (c *ChannelSimple) Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
- func (c *ChannelSimple) Qos(prefetchCount, prefetchSize int, global bool) error
- func (c *ChannelSimple) QueueBind(name, key, exchange string, noWait bool, args amqp.Table) error
- func (c *ChannelSimple) QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error)
- type RabbitMQ
- type RabbitMQSimple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
Channel is an autogenerated mock type for the Channel type
func NewChannel ¶
func NewChannel(t mockConstructorTestingTNewChannel) *Channel
NewChannel creates a new instance of Channel. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Channel) Consume ¶
func (_m *Channel) Consume(queue string, consumer string, autoAck bool, exclusive bool, noLocal bool, noWait bool, args amqp091.Table) (<-chan amqp091.Delivery, error)
Consume provides a mock function with given fields: queue, consumer, autoAck, exclusive, noLocal, noWait, args
func (*Channel) ExchangeDeclare ¶
func (_m *Channel) ExchangeDeclare(name string, kind string, durable bool, autoDelete bool, internal bool, noWait bool, args amqp091.Table) error
ExchangeDeclare provides a mock function with given fields: name, kind, durable, autoDelete, internal, noWait, args
func (*Channel) NotifyClose ¶
NotifyClose provides a mock function with given fields: receiver
func (*Channel) Publish ¶
func (_m *Channel) Publish(exchange string, key string, mandatory bool, immediate bool, msg amqp091.Publishing) error
Publish provides a mock function with given fields: exchange, key, mandatory, immediate, msg
func (*Channel) Qos ¶
Qos provides a mock function with given fields: prefetchCount, prefetchSize, global
type ChannelSimple ¶
type ChannelSimple struct { CloseFunc func() error ConsumeFunc func(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error) ExchangeDeclareFunc func(name, kind string, durable, autoDelete, internal, noWait bool, args amqp.Table) error NotifyCloseFunc func(receiver chan *amqp.Error) chan *amqp.Error PublishFunc func(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error QosFunc func(prefetchCount int, prefetchSize int, global bool) error QueueBindFunc func(name, key, exchange string, noWait bool, args amqp.Table) error QueueDeclareFunc func(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error) }
ChannelSimple mocks the Channel type.
func (*ChannelSimple) Close ¶
func (c *ChannelSimple) Close() error
Close mocks the Channel.Close() method.
func (*ChannelSimple) Consume ¶
func (c *ChannelSimple) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error)
Consume mocks the Channel.Consume() method.
func (*ChannelSimple) ExchangeDeclare ¶
func (c *ChannelSimple) ExchangeDeclare(name, kind string, durable, autoDelete, internal, noWait bool, args amqp.Table) error
ExchangeDeclare mocks the Channel.ExchangeDeclare() method.
func (*ChannelSimple) NotifyClose ¶
func (c *ChannelSimple) NotifyClose(receiver chan *amqp.Error) chan *amqp.Error
NotifyClose mocks the Channel.NotifyClose() method.
func (*ChannelSimple) Publish ¶
func (c *ChannelSimple) Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
Publish mocks the Channel.Publish() method. nolint:gocritic // this is a mock.
func (*ChannelSimple) Qos ¶
func (c *ChannelSimple) Qos(prefetchCount, prefetchSize int, global bool) error
Qos mocks the Channel.Qos() method.
func (*ChannelSimple) QueueDeclare ¶
func (c *ChannelSimple) QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error)
QueueDeclare mocks the Channel.QueueDeclare() method.
type RabbitMQ ¶
RabbitMQ is an autogenerated mock type for the RabbitMQ type
func NewRabbitMQ ¶
func NewRabbitMQ(t mockConstructorTestingTNewRabbitMQ) *RabbitMQ
NewRabbitMQ creates a new instance of RabbitMQ. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
type RabbitMQSimple ¶
RabbitMQSimple is a simple mock type for the RabbitMQ.
func (*RabbitMQSimple) Channel ¶
func (r *RabbitMQSimple) Channel() (harego.Channel, error)
Channel mocks the RabbitMQ.Channel() method.
func (*RabbitMQSimple) Close ¶
func (r *RabbitMQSimple) Close() error
Close mocks the RabbitMQ.Close() method.