MsgQueue

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, factory AMQPFactory)

Types

type AMQPFactory

type AMQPFactory func(conf *settings.AMQPConf) (IAMQP, error)

type AMQPv0

type AMQPv0 struct {
}

func (*AMQPv0) GetProtocolVersion

func (a0 *AMQPv0) GetProtocolVersion() int8

func (*AMQPv0) Name

func (a0 *AMQPv0) Name() string

func (*AMQPv0) ReceiveMessage

func (a0 *AMQPv0) ReceiveMessage(queue string, f func(interface{}))

func (*AMQPv0) SendMessage

func (a0 *AMQPv0) SendMessage(queue, msg string)

type AMQPv1

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

func (*AMQPv1) GetProtocolVersion

func (a1 *AMQPv1) GetProtocolVersion() int8

func (*AMQPv1) Name

func (a1 *AMQPv1) Name() string

func (*AMQPv1) ReceiveMessage

func (a1 *AMQPv1) ReceiveMessage(queue string, callback func(interface{}))

func (*AMQPv1) SendMessage

func (a1 *AMQPv1) SendMessage(queue, msg string)

type IAMQP

type IAMQP interface {
	Name() string
	SendMessage(string, string)
	ReceiveMessage(string, func(interface{}))
	GetProtocolVersion() int8
}

func Connect

func Connect(conf *settings.AMQPConf) (IAMQP, error)

func NewConnectWithAMQPv0

func NewConnectWithAMQPv0(conf *settings.AMQPConf) (IAMQP, error)

func NewConnectWithAMQPv1

func NewConnectWithAMQPv1(conf *settings.AMQPConf) (IAMQP, error)

Jump to

Keyboard shortcuts

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