rgmq

package
v1.0.18 Latest Latest
Warning

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

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

README

rabbitMq工具

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(this *rgrequest.Client, config Config) (c *Client, err error)

New 链接rabbitmq @Param : @Return : @Author : LiJunDong @Time : 2022-05-27

func (*Client) Listen

func (c *Client) Listen(pf func(delivery amqp.Delivery) bool) (err error)

Listen 开始监听 @Param : @Return : @Author : LiJunDong @Time : 2022-06-03

func (*Client) Publish

func (c *Client) Publish(data string, complete func(bool, string)) (err error)

Publish 发送消息 @Param : data 发送的数据, complete: 发送后mq回调结果执行函数 @Return : err error @Author : LiJunDong @Time : 2022-06-18

type Config

type Config struct {
	Host     string
	Exchange string
	Routing  string
	Vhost    string
	Queue    string
	AutoAck  bool
}

Jump to

Keyboard shortcuts

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