messaging

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

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

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

func NewBroker

func NewBroker() *Broker

func (*Broker) AwaitReceivers

func (b *Broker) AwaitReceivers(address string, n int)

type Connection

type Connection interface {
	Sender(address string) (Sender, error)
	Receiver(address string, credit uint32) (Receiver, error)
	Close()
}

type ConnectionFactory

type ConnectionFactory interface {
	Connect() (Connection, error)
	Url() string
}

type MockConnectionFactory

type MockConnectionFactory struct {
	URL    string
	Broker *Broker
}

func NewMockConnectionFactory

func NewMockConnectionFactory(t *testing.T, url string) *MockConnectionFactory

NewMockConnectionFactory creates an in-memory message brokering stub. Messages will be sent multicast and are buffered for all unclosed receivers.

func (*MockConnectionFactory) Connect

func (f *MockConnectionFactory) Connect() (Connection, error)

func (*MockConnectionFactory) Url

func (f *MockConnectionFactory) Url() string

type Receiver

type Receiver interface {
	Receive() (*amqp.Message, error)
	Accept(*amqp.Message) error
	Close() error
}

type Sender

type Sender interface {
	Send(msg *amqp.Message) error
	Close() error
}

Jump to

Keyboard shortcuts

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