rabbitmq

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumeQueue

func ConsumeQueue(cq *ChannelQueue, handler ConsumeHandler)

ConsumeQueue 注册消费队列

func PublishTask

func PublishTask(cq *ChannelQueue, data CommandData)

PublishTask 发布队列数据

Types

type ChannelQueue

type ChannelQueue struct {
	Channel *amqp.Channel
	Queue   *amqp.Queue
}

func DeclareQueue

func DeclareQueue(queueName string, handler CloseHandler) (cq *ChannelQueue)

DeclareQueue 声明队列

type CloseHandler

type CloseHandler func(cq *ChannelQueue)

type CommandData

type CommandData struct {
	Act     string            `json:"act"`
	Args    map[string]string `json:"args"`
	TryTime int               `json:"try_time"`
	MaxTry  int               `json:"max_try"`
}

type ConsumeHandler

type ConsumeHandler func(cq *ChannelQueue, data CommandData)

Jump to

Keyboard shortcuts

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