topology

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package topology contains the reference interface for declaring the topology used by the application through an AMQP connection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel interface {
	Tx() error
	TxCommit() error
	TxRollback() error

	QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error)
	QueueBind(name, key, exchange string, noWait bool, args amqp.Table) error

	ExchangeBind(destination, key, source string, noWait bool, args amqp.Table) error
	ExchangeDeclare(name, kind string, durable, autoDelete, internal, noWait bool, args amqp.Table) error
}

Channel is the channel interface the topology Declarer uses to declare topologies.

type Declarer

type Declarer interface {
	Declare(Channel) error
}

Declarer is a component able to declare a topology, given an AMQP channel to communicate with the AMQP broker.

Declarer is a fallible operation, since it communicates with the external broker, so it may return an error.

func All

func All(declarers ...Declarer) Declarer

All declares the whole topology provided in a transaction.

An error is returned if committing, rolling-back or just declaring the topology failed with an error.

A nil Declarer is returned instead if no Declarers are supplied as arguments.

Directories

Path Synopsis
Package exchange adds a topology.Declarer interface able to describe AMQP exchanges.
Package exchange adds a topology.Declarer interface able to describe AMQP exchanges.
kind
Package kind contains all supported AMQP exchange kinds.
Package kind contains all supported AMQP exchange kinds.
Package queue adds a topology.Declarer interface able to describe AMQP queues.
Package queue adds a topology.Declarer interface able to describe AMQP queues.

Jump to

Keyboard shortcuts

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