amqp

package
v0.0.0-...-8cc84bd Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: AGPL-3.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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