Documentation ¶
Index ¶
- func Dial(username, password, host, port string) (*amqp.Connection, *amqp.Channel, error)
- type AMQPChannel
- func (channel *AMQPChannel) Receive(name string) (<-chan amqp.Delivery, error)
- func (c *AMQPChannel) ReceiveOnExchange(name string, excType string) (<-chan amqp.Delivery, error)
- func (channel *AMQPChannel) Send(name string, body []byte) error
- func (c *AMQPChannel) SendToExchange(name string, excType string, body []byte) error
- type Channel
- type MockAMQPChannel
- func (channel *MockAMQPChannel) Receive(name string) (<-chan amqp.Delivery, error)
- func (channel *MockAMQPChannel) ReceiveOnExchange(name string, excType string) (<-chan amqp.Delivery, error)
- func (channel *MockAMQPChannel) Send(name string, body []byte) error
- func (channel *MockAMQPChannel) SendToExchange(name string, excType string, body []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AMQPChannel ¶
AMQPChannel wraps a amqp.Channel
func (*AMQPChannel) Receive ¶
func (channel *AMQPChannel) Receive(name string) (<-chan amqp.Delivery, error)
Receive immediately starts delivering queued messages.
func (*AMQPChannel) ReceiveOnExchange ¶
ReceiveOnExchange immediately starts delivering queued messages.
func (*AMQPChannel) Send ¶
func (channel *AMQPChannel) Send(name string, body []byte) error
Send sends body to an exchange on the server.
func (*AMQPChannel) SendToExchange ¶
func (c *AMQPChannel) SendToExchange(name string, excType string, body []byte) error
SendToExchange sends body to an exchange.
type Channel ¶
type Channel interface { // Send sends body to a message queue. Send(name string, body []byte) error // Receive immediately starts delivering queued messages. Receive(name string) (<-chan amqp.Delivery, error) // SendToExchange sends body to an exchange. SendToExchange(name string, excType string, body []byte) error // Receive immediately starts delivering queued messages. ReceiveOnExchange(name string, excType string) (<-chan amqp.Delivery, error) }
Channel sends and receives the messages from the queus
type MockAMQPChannel ¶
type MockAMQPChannel struct{}
MockAMQPChannel is a mock from amqp.Channel
func (*MockAMQPChannel) Receive ¶
func (channel *MockAMQPChannel) Receive(name string) (<-chan amqp.Delivery, error)
Receive mocks Receive method
func (*MockAMQPChannel) ReceiveOnExchange ¶
func (channel *MockAMQPChannel) ReceiveOnExchange(name string, excType string) (<-chan amqp.Delivery, error)
ReceiveOnExchange immediately starts delivering queued messages.
func (*MockAMQPChannel) Send ¶
func (channel *MockAMQPChannel) Send(name string, body []byte) error
Send mocks Send method
func (*MockAMQPChannel) SendToExchange ¶
func (channel *MockAMQPChannel) SendToExchange(name string, excType string, body []byte) error
SendToExchange mocks sending body to an exchange.
Click to show internal directories.
Click to hide internal directories.