amqp_queue

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExchangeDeclare

type ExchangeDeclare struct {
	Name       string // name
	Kind       string // type
	Durable    bool   // durable
	AutoDelete bool   // auto-deleted
	Internal   bool   // internal

	Args map[string]interface{} // args
	// contains filtered or unexported fields
}

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 added in v1.0.2

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

func (rabbitQueue *RabbitQueue) SubscribeToQueue(queueName string, consumerName string, handleFunc func(delivery amqp.Delivery)) error

Jump to

Keyboard shortcuts

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