amqp

package
v0.0.0-...-edeb7e2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QUOROM_QUEUE           = "QUORUM"
	CLASSIC_QUEUE          = "CLASSIC"
	MAX_QUEUE_LENGTH_BYTES = 1024 * 1024 * 20 // 20MB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerPeer

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

BrokerPeer implements the peer interface for AMQP brokers

func NewBrokerPeer

func NewBrokerPeer(settings broker.MQSettings) *BrokerPeer

NewBrokerPeer creates and returns a new Peer for communicating with AMQP

func (*BrokerPeer) GetResults

func (bp *BrokerPeer) GetResults() *broker.Results

func (*BrokerPeer) SetupPublishers

func (bp *BrokerPeer) SetupPublishers() error

func (*BrokerPeer) SetupSubscribers

func (bp *BrokerPeer) SetupSubscribers() error

func (*BrokerPeer) StartPublishers

func (bp *BrokerPeer) StartPublishers()

func (*BrokerPeer) StartSubscribers

func (bp *BrokerPeer) StartSubscribers()

func (*BrokerPeer) Teardown

func (bp *BrokerPeer) Teardown()

Performs any broker-connection cleanup after test is done

type Peer

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

Peer stores specific AMQP broker connection information

func (*Peer) DoneChannel

func (p *Peer) DoneChannel()

Done signals to the peer that message publishing has completed.

func (*Peer) ErrorChannel

func (p *Peer) ErrorChannel() <-chan error

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

func (*Peer) ReceiveMessage

func (p *Peer) ReceiveMessage() ([]byte, error)

func (*Peer) SendChannel

func (p *Peer) SendChannel() chan<- []byte

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

func (*Peer) SetupPublishRoutine

func (p *Peer) SetupPublishRoutine()

Goroutine which fetch messages from send-channel and publish them

func (*Peer) SetupPublisherConnection

func (p *Peer) SetupPublisherConnection(connectionURL string) error

func (*Peer) SetupSubscriberConnection

func (p *Peer) SetupSubscriberConnection(connectionURL, queueType string) error

Jump to

Keyboard shortcuts

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