Documentation ¶
Index ¶
Constants ¶
View Source
const (
EnvURL = "CPS_AMQP_URL"
)
Environment variables linked to session parameters
Variables ¶
This section is empty.
Functions ¶
func NewSession ¶
func NewSession() (*amq.Connection, error)
NewSession creates a new connection to an AMQP bus, using env var EnvCpsAmqpURL as configuration.
Types ¶
type Publisher ¶
type Publisher interface { // Publish sends an amqp.Publishing from the client to an exchange on the server. Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error }
Publisher is an interface that represents a non-consumable AMQP channel. This interface is implemented by amqp.Channel. It should be used in services that only publish to amqp, in order to be able to test them easily by mocking this interface.
Click to show internal directories.
Click to hide internal directories.