mq

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerMessage

type ConsumerMessage struct {
	Value interface{}
}

type IConsumer

type IConsumer interface {
	io.Closer
	BytesMessages() <-chan []byte     // 返回消息内容管道
	BindJSONChan(channel interface{}) // 绑定JSON管道,输出已经过反序列化的对象
}

type IProducer

type IProducer interface {
	io.Closer
	SendJSON(topic string, value interface{}) (interface{}, error) // 发布JSON消息
	SendJSONs(messages []*ProducerMessage) error                   // 批量发布JSON消息
}

type ProducerMessage

type ProducerMessage struct {
	Topic string
	Value interface{}
}

type TestMsg

type TestMsg struct {
	Message string        `json:"message"`
	Time    date.Datetime `json:"time"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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