amqp

package module
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 9 Imported by: 0

README

amqp-lib

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcAmqp

type AcAmqp interface {
	Publish(ctx context.Context, data models.AmqpPublishData, payload interface{}) error
	Subscribe(ctx context.Context, data models.AmqpPublishData, queue string, handler func([]byte))
	CloseConnection()
}

func NewAutoConnectAqmp

func NewAutoConnectAqmp(ctx context.Context, amqpURI string, name string, debug bool) AcAmqp

type Connection

type Connection struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(amqpURI string, name string, handler *models.ConnectionHandler, debug bool) *Connection

NewConnection returns the new connection object

func (*Connection) Connect

func (c *Connection) Connect(ctx context.Context, connectHandler *models.ConnectionHandler)

func (*Connection) Disconnect

func (c *Connection) Disconnect()

func (*Connection) Publish

func (c *Connection) Publish(body []byte, data models.AmqpPublishData) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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