mq

package
v0.0.0-...-67d91c4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQ

type MQ interface {
	Producer(topic string, data []byte)
	Consumer(topic string, ch chan []byte, f func(b []byte))
}

func NewMQ

func NewMQ() MQ

type MQDevice

type MQDevice struct {
	Type   string // add  del
	Topic  string
	Device string
}

通知topic 加入新的设备连接

type MQMsg

type MQMsg struct {
	Topic    string `json:"topic"`
	Message  string `json:"message"`
	SendTime string `json:"send_time"`
}

type MQNsqService

type MQNsqService struct {
}

func (*MQNsqService) Consumer

func (m *MQNsqService) Consumer(topic string, ch chan []byte, f func(b []byte))

func (*MQNsqService) Producer

func (m *MQNsqService) Producer(topic string, data []byte)

type MQRabbitService

type MQRabbitService struct {
}

func (*MQRabbitService) Consumer

func (m *MQRabbitService) Consumer(topic string, ch chan []byte, f func(b []byte))

func (*MQRabbitService) Producer

func (m *MQRabbitService) Producer(topic string, data []byte)

Jump to

Keyboard shortcuts

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