service

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	WORKER_ADDRESS_EXPIRE                  = 60  //60秒重新取worker address
	PULL_OFFLINE_WORKER_MSG_NUM_EVERY_TIME = 500 //每次拉取下线worker消息个数
	MAX_REQ_CNT                            = 3   //每个消息请求worker最大次数
)

Variables

This section is empty.

Functions

func Init

func Init(brokerList string, topicPrefix string, centerIp string, rpcPort int64)

func InitKafkaConf

func InitKafkaConf(brokerList string, topicPrefix string) *entity.KafkaConfig

Types

type CenterConsumer

type CenterConsumer struct {
}

func (*CenterConsumer) ConsumerDelayMsg

func (this *CenterConsumer) ConsumerDelayMsg(req message.Request, res *message.Response) error

延时消息消费

type Consumer

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

func (*Consumer) Cleanup

func (consumer *Consumer) Cleanup(sarama.ConsumerGroupSession) error

func (*Consumer) ConsumeClaim

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

func (*Consumer) Setup

func (consumer *Consumer) Setup(sarama.ConsumerGroupSession) error

type ICenterService

type ICenterService interface {
	Start()
	Stop()
	// contains filtered or unexported methods
}
var CenterService ICenterService

func NewCenterService

func NewCenterService(brokerList string, topicPrefix string, rpcPort int64, centerIp string) ICenterService

Jump to

Keyboard shortcuts

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