amqpclient

package
v0.1.8-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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

func (c *AMQPClient) CreateQueue(name string, durable bool) (amqp.Queue, error)

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

Jump to

Keyboard shortcuts

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