syncmq

package
v0.0.0-...-1b09624 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hooker

type Hooker interface {
	HandleMqMessage(ctx *context.BizContext, message *TopicMessage) error
}

type MqConsumerServer

type MqConsumerServer struct {
	Ctx      *context.BaseContext
	Kind     string
	Topics   []string
	Cluster  string
	ConfPath string
	LogPath  string
	Group    string
	// contains filtered or unexported fields
}

func NewMqConsumer

func NewMqConsumer(ctx *context.BaseContext, conf config.MqConfig, messageChan chan<- *TopicMessage) *MqConsumerServer

broker consumer

func (*MqConsumerServer) Close

func (consumer *MqConsumerServer) Close()

func (*MqConsumerServer) DistributeTopic

func (consumer *MqConsumerServer) DistributeTopic(topicName string, message string)

callback

func (*MqConsumerServer) Start

func (consumer *MqConsumerServer) Start() error

start

type StrategySyncMq

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

func NewSyncMqStrategy

func NewSyncMqStrategy(ctx *context.BaseContext, taskName string, conf config.MqConfig, hook Hooker) (*StrategySyncMq, error)

func (*StrategySyncMq) Name

func (strategy *StrategySyncMq) Name() string

func (*StrategySyncMq) Run

func (strategy *StrategySyncMq) Run() error

type TopicMessage

type TopicMessage struct {
	TopicName string
	Message   string
}

Jump to

Keyboard shortcuts

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