amqp

package
v0.0.0-...-dd01cb3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MyExchange     = "ex-change"
	MyQueue        = "q-ue-ue"
	MyExchangeType = "direct"
)

Variables

This section is empty.

Functions

func HandleError

func HandleError(err error, msg string)

Types

type AMQPObject

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

func InitConnect

func InitConnect(addr string) (*AMQPObject, error)

func (*AMQPObject) CloseMQ

func (q *AMQPObject) CloseMQ()

func (*AMQPObject) CreateExchange

func (q *AMQPObject) CreateExchange(ex Exchange) error

func (*AMQPObject) CreateQueue

func (q *AMQPObject) CreateQueue(que Queue) (*amqp.Queue, error)

func (*AMQPObject) DeleteQueue

func (q *AMQPObject) DeleteQueue(queueName string) error

func (*AMQPObject) Listen

func (q *AMQPObject) Listen(queueName string, routeKeys []string) (<-chan []byte, error)

func (*AMQPObject) Publish

func (q *AMQPObject) Publish(exchangeName string, routeKeys []string, data []byte) error

func (*AMQPObject) Subcribe

func (q *AMQPObject) Subcribe(exchangeName, queueName string, routeKeys []string)

type Exchange

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

type Queue

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

Jump to

Keyboard shortcuts

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