mq

package
v1.1.45 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IMQ

type IMQ interface {
	// Send 发送消息
	Send(topic string, data []byte) error

	// Receive 接收消息 返回一个接收通道
	Receive(topic string) <-chan *Msg

	// RemoveReceiver 移除某个topic的接收通道
	RemoveReceiver(topic string)

	// Close 关闭连接
	Close()
}

IMQ mq接口

func NewMockMQ

func NewMockMQ() IMQ

NewMockMQ 创建一个mock的mq

type Msg

type Msg struct {
	Data  []byte
	Topic []byte
}

Msg 消息结构

Jump to

Keyboard shortcuts

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