rabbitmq

package
v0.0.0-...-7b67322 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RabbitMQ

type RabbitMQ struct {
	Name string
	// contains filtered or unexported fields
}

func New

func New(s string) *RabbitMQ

func (*RabbitMQ) Bind

func (q *RabbitMQ) Bind(exchange string)

func (*RabbitMQ) Close

func (q *RabbitMQ) Close()

Consume方法用于生成一个接收消息的go channel,使客户程序可以通过Go语言的原生机制接收队列中的消息。

func (*RabbitMQ) Consume

func (q *RabbitMQ) Consume() <-chan amqp.Delivery

Publish方法可以往某个exchange发送消息。

func (*RabbitMQ) Publish

func (q *RabbitMQ) Publish(exchange string, body interface{})

Send方法可以往某个消息队列发送消息。

func (*RabbitMQ) Send

func (q *RabbitMQ) Send(queue string, body interface{})

Jump to

Keyboard shortcuts

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