Documentation ¶
Index ¶
- type AMQPClient
- func (c *AMQPClient) BindQueue(name string) error
- func (c *AMQPClient) Close() error
- func (c *AMQPClient) Consume(queue string) (<-chan amqp.Delivery, error)
- func (c *AMQPClient) CreateExchange() error
- func (c *AMQPClient) CreateQueue(name string, durable bool) (amqp.Queue, error)
- func (c *AMQPClient) DeliverMessages(data []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMQPClient ¶
type AMQPClient struct {
// contains filtered or unexported fields
}
AMQPClient which store connection and connected exchanges
func NewAMQPClient ¶
func NewAMQPClient(config configuration.AMQPTransportConfig) (*AMQPClient, error)
NewAMQPClient creates new AMQPClient with new connection
func (*AMQPClient) BindQueue ¶
func (c *AMQPClient) BindQueue(name string) error
BindQueue binds queue by name to exchange setted in constructor
func (*AMQPClient) Close ¶
func (c *AMQPClient) Close() error
Close close all channels and connection
func (*AMQPClient) Consume ¶
func (c *AMQPClient) Consume(queue string) (<-chan amqp.Delivery, error)
Consume returns chan amqp.Delivery for queue
func (*AMQPClient) CreateExchange ¶
func (c *AMQPClient) CreateExchange() error
CreateExchange create direct durable exchange with inited parameters in constructor
func (*AMQPClient) CreateQueue ¶
CreateQueue create queue with name and durability parameters
func (*AMQPClient) DeliverMessages ¶
func (c *AMQPClient) DeliverMessages(data []string) error
DeliverMessages construct amqp.Publishings from array of array of bytes, and publish each one by one to exchange
Click to show internal directories.
Click to hide internal directories.