Documentation
¶
Index ¶
- type PubSub
- func (p *PubSub) Connect() error
- func (p *PubSub) Initialize() error
- func (p *PubSub) Publish(routingKey string, contentType string, body []byte) error
- func (p *PubSub) PublishJSON(routingKey string, data interface{}) error
- func (p *PubSub) QueueDeclare(name string) (amqp.Queue, error)
- func (p *PubSub) SetupChannel() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubSub ¶
type PubSub struct { Config *config.AMQPConfig Conn *amqp.Connection Channel *amqp.Channel }
func New ¶
func New(cfg *config.AMQPConfig) *PubSub
func (*PubSub) Initialize ¶
func (*PubSub) Publish ¶
Publish a byte string using a given routing key (in our case, always the queue name)
func (*PubSub) QueueDeclare ¶
Setup a persistent queue
func (*PubSub) SetupChannel ¶
Click to show internal directories.
Click to hide internal directories.