mq

package
v0.0.0-...-20515da Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   sarama.KafkaVersion
	CancelCtx context.Context
)
View Source
var (
	SyncProducer  sarama.SyncProducer
	AsyncProducer sarama.AsyncProducer
)
View Source
var (
	JudgeRequestDeliveryChan  chan []byte
	JudgeResponseDeliveryChan chan []byte
)

Functions

func CreateJudgeRequestConsumer

func CreateJudgeRequestConsumer(topics []string, group string)

func CreateJudgeResponseConsumer

func CreateJudgeResponseConsumer(topics []string, group string)

func InitAsyncProducer

func InitAsyncProducer()

func InitKafka

func InitKafka(ctx context.Context)

func InitProducer

func InitProducer()

func InitSyncProducer

func InitSyncProducer()

func PublishMessageAsync

func PublishMessageAsync(topic string, key, value []byte)

func PublishMessageSync

func PublishMessageSync(topic string, key, value []byte) error

Types

type JudgeRequestConsumer

type JudgeRequestConsumer struct {
	// contains filtered or unexported fields
}

func (*JudgeRequestConsumer) Cleanup

func (*JudgeRequestConsumer) ConsumeClaim

func (consumer *JudgeRequestConsumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

func (*JudgeRequestConsumer) Setup

type JudgeResponseConsumer

type JudgeResponseConsumer struct {
	// contains filtered or unexported fields
}

func (*JudgeResponseConsumer) Cleanup

func (*JudgeResponseConsumer) ConsumeClaim

func (consumer *JudgeResponseConsumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

func (*JudgeResponseConsumer) Setup

Jump to

Keyboard shortcuts

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