queue

package
v0.0.0-...-74fbc04 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2014 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueueConnection

type QueueConnection struct {
	Connection *amqp.Connection
	Channel    *amqp.Channel

	HandleChannelClose func(message string)
	HandleFatalError   func(err *amqp.Error)
	// contains filtered or unexported fields
}

func NewQueueConnection

func NewQueueConnection(amqpURI string) (*QueueConnection, error)

func (*QueueConnection) BindQueueToExchange

func (c *QueueConnection) BindQueueToExchange(queueName string, exchangeName string) error

func (*QueueConnection) Close

func (c *QueueConnection) Close() error

func (*QueueConnection) Consume

func (c *QueueConnection) Consume(queueName string) (<-chan amqp.Delivery, error)

func (*QueueConnection) ExchangeDeclare

func (c *QueueConnection) ExchangeDeclare(exchangeName string, exchangeType string) error

func (*QueueConnection) Publish

func (c *QueueConnection) Publish(exchangeName string, routingKey string, contentType string, body string) error

func (*QueueConnection) QueueDeclare

func (c *QueueConnection) QueueDeclare(queueName string) (amqp.Queue, error)

type QueueManager

type QueueManager struct {
	ExchangeName string
	QueueName    string
	Consumer     *QueueConnection
	Producer     *QueueConnection
}

func NewQueueManager

func NewQueueManager(amqpAddr string, exchangeName string, queueName string) (*QueueManager, error)

func (*QueueManager) Close

func (h *QueueManager) Close() error

func (*QueueManager) Consume

func (h *QueueManager) Consume() (<-chan amqp.Delivery, error)

func (*QueueManager) Publish

func (h *QueueManager) Publish(
	routingKey string,
	contentType string,
	body string) error

Jump to

Keyboard shortcuts

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