Documentation ¶
Index ¶
- type ExchangeDeclare
- type Queue
- type RabbitQueue
- func (rabbitQueue *RabbitQueue) Connect() error
- func (rabbitQueue *RabbitQueue) GetState() string
- func (rabbitQueue *RabbitQueue) NewChannel() (*amqp.Channel, error)
- func (rabbitQueue *RabbitQueue) NotifyState(receiver chan string)
- func (rabbitQueue *RabbitQueue) PublishOnExchange(exchangeName, routingKey string, publishing *amqp.Publishing) error
- func (rabbitQueue *RabbitQueue) PublishOnQueue(message []byte, queueName string) error
- func (rabbitQueue *RabbitQueue) SubscribeToQueue(queueName string, consumerName string, handleFunc func(delivery amqp.Delivery)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExchangeDeclare ¶
type Queue ¶
type Queue interface { Connect() error NewChannel() (*amqp.Channel, error) NotifyState(receiver chan string) GetState() string PublishOnQueue(message []byte, queueName string) error PublishOnExchange(message []byte, exchange *ExchangeDeclare, routingKey string) error SubscribeToQueue(queueName string, consumerName string, handleFunc func(delivery amqp.Delivery)) error }
type RabbitQueue ¶
type RabbitQueue struct {
// contains filtered or unexported fields
}
func NewMessageClient ¶
func NewMessageClient(connUrl string) (*RabbitQueue, error)
func (*RabbitQueue) Connect ¶
func (rabbitQueue *RabbitQueue) Connect() error
func (*RabbitQueue) GetState ¶
func (rabbitQueue *RabbitQueue) GetState() string
func (*RabbitQueue) NewChannel ¶
func (rabbitQueue *RabbitQueue) NewChannel() (*amqp.Channel, error)
func (*RabbitQueue) NotifyState ¶
func (rabbitQueue *RabbitQueue) NotifyState(receiver chan string)
func (*RabbitQueue) PublishOnExchange ¶
func (rabbitQueue *RabbitQueue) PublishOnExchange(exchangeName, routingKey string, publishing *amqp.Publishing) error
func (*RabbitQueue) PublishOnQueue ¶
func (rabbitQueue *RabbitQueue) PublishOnQueue(message []byte, queueName string) error
func (*RabbitQueue) SubscribeToQueue ¶
Click to show internal directories.
Click to hide internal directories.