Documentation ¶
Index ¶
- Constants
- Variables
- func NewTransport() transport.Transport
- type RabbitChannel
- func (r *RabbitChannel) BindQueue(queue, exchange string) error
- func (r *RabbitChannel) Close() error
- func (r *RabbitChannel) Connect() error
- func (r *RabbitChannel) ConsumeQueue(queue string) (<-chan amqp.Delivery, error)
- func (r *RabbitChannel) DeclareDurableQueue(queue string) error
- func (r *RabbitChannel) DeclareExchange(exchange string) error
- func (r *RabbitChannel) DeclareQueue(queue string) error
- func (r *RabbitChannel) DeclareReplyQueue(queue string) error
- func (r *RabbitChannel) Publish(exchange, routingKey string, message amqp.Publishing) error
- type RabbitConnection
- func (r *RabbitConnection) Close()
- func (r *RabbitConnection) Connect(connected chan bool)
- func (r *RabbitConnection) Consume(serverName string) (<-chan amqp.Delivery, *RabbitChannel, error)
- func (r *RabbitConnection) Init() chan bool
- func (r *RabbitConnection) IsConnected() bool
- func (r *RabbitConnection) Publish(exchange, routingKey string, msg amqp.Publishing) error
Constants ¶
View Source
const (
DirectReplyQueue = "amq.rabbitmq.reply-to"
)
Variables ¶
View Source
var ( RabbitURL string Exchange string )
View Source
var ( ErrCouldntConnect = errors.InternalService("", "Could not connect to RabbitMQ", nil) ErrDeliveriesClosed = errors.InternalService("", "Delivery channel closed", nil) ErrNoReplyTo = errors.BadRequest("", "Request does not have appropriate X-Rabbit-ReplyTo header", nil) )
Functions ¶
func NewTransport ¶
Types ¶
type RabbitChannel ¶
type RabbitChannel struct {
// contains filtered or unexported fields
}
func NewRabbitChannel ¶
func NewRabbitChannel(conn *amqp.Connection) (*RabbitChannel, error)
func (*RabbitChannel) BindQueue ¶
func (r *RabbitChannel) BindQueue(queue, exchange string) error
func (*RabbitChannel) Close ¶
func (r *RabbitChannel) Close() error
func (*RabbitChannel) Connect ¶
func (r *RabbitChannel) Connect() error
func (*RabbitChannel) ConsumeQueue ¶
func (r *RabbitChannel) ConsumeQueue(queue string) (<-chan amqp.Delivery, error)
func (*RabbitChannel) DeclareDurableQueue ¶
func (r *RabbitChannel) DeclareDurableQueue(queue string) error
func (*RabbitChannel) DeclareExchange ¶
func (r *RabbitChannel) DeclareExchange(exchange string) error
func (*RabbitChannel) DeclareQueue ¶
func (r *RabbitChannel) DeclareQueue(queue string) error
func (*RabbitChannel) DeclareReplyQueue ¶
func (r *RabbitChannel) DeclareReplyQueue(queue string) error
func (*RabbitChannel) Publish ¶
func (r *RabbitChannel) Publish(exchange, routingKey string, message amqp.Publishing) error
type RabbitConnection ¶
type RabbitConnection struct { Connection *amqp.Connection Channel *RabbitChannel // contains filtered or unexported fields }
func NewRabbitConnection ¶
func NewRabbitConnection() *RabbitConnection
func (*RabbitConnection) Close ¶
func (r *RabbitConnection) Close()
func (*RabbitConnection) Connect ¶
func (r *RabbitConnection) Connect(connected chan bool)
func (*RabbitConnection) Consume ¶
func (r *RabbitConnection) Consume(serverName string) (<-chan amqp.Delivery, *RabbitChannel, error)
func (*RabbitConnection) Init ¶
func (r *RabbitConnection) Init() chan bool
func (*RabbitConnection) IsConnected ¶
func (r *RabbitConnection) IsConnected() bool
func (*RabbitConnection) Publish ¶
func (r *RabbitConnection) Publish(exchange, routingKey string, msg amqp.Publishing) error
Click to show internal directories.
Click to hide internal directories.