Documentation ¶
Index ¶
- func BasicJSONPublishing(data interface{}) (p amqp.Publishing, err error)
- type Publisher
- func (p *Publisher) Close() error
- func (p *Publisher) IsUp() bool
- func (p *Publisher) Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
- func (p *Publisher) PublishExchange(eName string, mandatory, immediate bool, msg amqp.Publishing) error
- func (p *Publisher) PublishKey(key string, mandatory, immediate bool, msg amqp.Publishing) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicJSONPublishing ¶
func BasicJSONPublishing(data interface{}) (p amqp.Publishing, err error)
BasicJSONPublishing creates a simple amqp.Publishing containing a JSON document
Types ¶
type Publisher ¶
type Publisher struct { Config *amqpconfig.Config // contains filtered or unexported fields }
Publisher structure
func NewPublisher ¶
func NewPublisher(config *amqpconfig.Config) (p Publisher, err error)
NewPublisher returns a basic forwarder (no ampq authentication)
func (*Publisher) Publish ¶
func (p *Publisher) Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
Publish publishes a msg into the appropriate exchange and Queue
func (*Publisher) PublishExchange ¶
func (p *Publisher) PublishExchange(eName string, mandatory, immediate bool, msg amqp.Publishing) error
PublishExchange publishes a message to an Exchange only
func (*Publisher) PublishKey ¶
PublishKey publishes a message to a Queue only
Click to show internal directories.
Click to hide internal directories.