amqp

package
v0.0.0-...-44e1a4f Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peer

type Peer struct {
	// contains filtered or unexported fields
}

Peer implements the peer interface for AMQP brokers.

func NewPeer

func NewPeer(host string) (*Peer, error)

NewPeer creates and returns a new Peer for communicating with AMQP brokers.

func (*Peer) Done

func (a *Peer) Done()

Done signals to the peer that message publishing has completed.

func (*Peer) Errors

func (a *Peer) Errors() <-chan error

Errors returns the channel on which the peer sends publish errors.

func (*Peer) Recv

func (a *Peer) Recv() ([]byte, error)

Recv returns a single message consumed by the peer. Subscribe must be called before this. It returns an error if the receive failed.

func (*Peer) Send

func (a *Peer) Send() chan<- []byte

Send returns a channel on which messages can be sent for publishing.

func (*Peer) Setup

func (a *Peer) Setup()

Setup prepares the peer for testing.

func (*Peer) Subscribe

func (a *Peer) Subscribe() error

Subscribe prepares the peer to consume messages.

func (*Peer) Teardown

func (a *Peer) Teardown()

Teardown performs any cleanup logic that needs to be performed after the test is complete.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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