broker

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 (*Broker) Close

func (b *Broker) Close() error

func (*Broker) Consume

func (b *Broker) Consume(queue, exchange, exchangeKing string, handler func(packet brokerPacket.IPacket))

func (*Broker) IsAvailable

func (b *Broker) IsAvailable() bool

func (*Broker) Publish

func (b *Broker) Publish(queue, exchange, exchangeKind string, body []byte) error

type IBroker

type IBroker interface {
	IsAvailable() bool
	Consume(queue, exchange, exchangeKind string, handler func(packet brokerPacket.IPacket))
	Publish(queue, exchange, exchangeKind string, body []byte) error
	Close() error
}

func NewBroker

func NewBroker(config brokerConfig.IConfig) (IBroker, error)

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) Close

func (m *Mock) Close() error

func (*Mock) Consume

func (m *Mock) Consume(queue, exchange, exchangeKind string, handler func(packet brokerPacket.IPacket))

func (*Mock) IsAvailable

func (m *Mock) IsAvailable() bool

func (*Mock) Publish

func (m *Mock) Publish(queue, exchange, exchangeKind string, body []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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