libs

package
v0.0.0-...-b24e085 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MessageInputChannel chan *sarama.ProducerMessage
)

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	Client   sarama.Consumer
	TopicMap map[string]interface{} // 消息topic所对应的[]byte解析结构体
}

func GetConsumerInstance

func GetConsumerInstance() *Consumer

func (*Consumer) SendMessage

func (t *Consumer) SendMessage(topic string, msg []byte) (err error)

func (*Consumer) StartConsumerMQ

func (t *Consumer) StartConsumerMQ(topic string)

type Producer

type Producer struct {
	Client sarama.AsyncProducer
}

func GetProducerInstance

func GetProducerInstance() *Producer

type ProducerConsumerServer

type ProducerConsumerServer struct{}

func (*ProducerConsumerServer) PublishSaleOrderMessage

func (t *ProducerConsumerServer) PublishSaleOrderMessage(in *pb.SaleOrderTemplateMessage, out *pb.SaleOrderTemplateMessage) (err error)

Jump to

Keyboard shortcuts

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