publisher

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

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) Close

func (p *Publisher) Close() error

Close closes the publisher

func (*Publisher) IsUp

func (p *Publisher) IsUp() bool

IsUp tells that the publisher is up and thus can be used for publishing

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

func (p *Publisher) PublishKey(key string, mandatory, immediate bool, msg amqp.Publishing) error

PublishKey publishes a message to a Queue only

Jump to

Keyboard shortcuts

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