rabbitmq

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

* @Author: lisheng * @Date: 2022-11-15 15:36:07 * @LastEditTime: 2022-11-24 16:28:20 * @LastEditors: lisheng * @Description: * @FilePath: /jf-go-kit/database/rabbitmq/rabbitmq.go

* @Author: lisheng * @Date: 2022-11-20 00:05:12 * @LastEditTime: 2022-11-20 08:56:29 * @LastEditors: lisheng * @Description: * @FilePath: /gitee.com/liqiyuworks/jf-go-kit/database/rabbitmq/record.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindQueue

func BindQueue(engineName, queue, exchange string, keys []string, nowait bool) (err error)

func ConsumeQueue

func ConsumeQueue(engineName, queue string) (deliveries <-chan amqp.Delivery, err error)

*

  • @description: ConsumeQueue - 消费者
  • @param {*} engineName
  • @param {string} queue
  • @return {*}
  • @author: liqiyuWorks

func DeclareExchange

func DeclareExchange(engineName, name, typ string, durable, autodelete, nowait bool) (err error)

func DeclareQueue

func DeclareQueue(engineName, name string, durable, autodelete, exclusive, nowait bool) (err error)

*

  • @description: DeclareQueue 创建队列
  • @param {string} name
  • @param {*} durable
  • @param {*} autodelete
  • @param {*} exclusive
  • @param {bool} nowait
  • @return {*}
  • @author: liqiyuWorks

func DeleteExchange

func DeleteExchange(engineName, name string) (err error)

func DeleteQueue

func DeleteQueue(engineName, name string) (err error)

*

  • @description: DeleteQueue 删除队列
  • @param {*} engineName
  • @param {string} name
  • @return {*}
  • @author: liqiyuWorks

func InitRabbitMQClient

func InitRabbitMQClient() func() error

func PublishQueue

func PublishQueue(engineName, exchange, key string, deliverymode, priority uint8, body string) (err error)

*

  • @description: 生成消息
  • @param {*} engineName
  • @param {*} exchange
  • @param {string} key
  • @param {*} deliverymode
  • @param {uint8} priority
  • @param {string} body
  • @return {*}
  • @author: liqiyuWorks

func UnBindQueue

func UnBindQueue(engineName, queue, exchange string, keys []string) (err error)

Types

type RabbitMQ

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

RabbitMQ Operate Wrapper

func CreateDBEngnine

func CreateDBEngnine(amqpuri string) (*RabbitMQ, error)

func (*RabbitMQ) Close

func (r *RabbitMQ) Close() (err error)

*

  • @description: 关闭 rabbitMQ connection
  • @return {*}
  • @author: liqiyuWorks

type RabbitMQManager

type RabbitMQManager struct {
	EngineMap map[string]*RabbitMQ
}
var (
	GRabbitMQManager *RabbitMQManager = new(RabbitMQManager)
)

Jump to

Keyboard shortcuts

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