broker

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: GPL-2.0 Imports: 7 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, error)

func (*Broker) Connect

func (broker *Broker) Connect(params util.UrlParams) error

func (*Broker) Disconnect

func (broker *Broker) Disconnect() error

func (*Broker) Listen

func (broker *Broker) Listen(queue string, callback OnMessageCallback) error

func (*Broker) SendMessage

func (broker *Broker) SendMessage(queue string, message Message) error

type Message

type Message struct {
	Body interface{} `json:"body"`
}

type OnMessageCallback

type OnMessageCallback func(*Message, amqp.Delivery)

Jump to

Keyboard shortcuts

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