mq

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToMQ added in v1.0.7

func ConnectToMQ() (*amqp.Connection, error)

func InitConnectToMQ added in v1.0.7

func InitConnectToMQ() (*amqp.Connection, error)

Types

type MQ

type MQ interface {
	Send([]byte) error
	Receive() (chan []byte, error)
	Close()
}

func InitMQ

func InitMQ() MQ

type RabbitMQ

type RabbitMQ struct {
	Ch   *amqp.Channel
	Q    *amqp.Queue
	Conn *amqp.Connection
}

func (*RabbitMQ) Close

func (r *RabbitMQ) Close()

func (*RabbitMQ) Receive

func (r *RabbitMQ) Receive() (chan []byte, error)

func (*RabbitMQ) Send

func (r *RabbitMQ) Send(body []byte) error

Jump to

Keyboard shortcuts

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