queue

package
v0.0.0-...-a8497ec Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(addr []string) error

func PushBack

func PushBack(data *protocol.EventData) error

func SetConsumer

func SetConsumer(x Consumer)

func StartConsume

func StartConsume() error

Types

type Consumer

type Consumer interface {
	Run() error
}

type ConsumerCfg

type ConsumerCfg struct {
	TopicList []string
	GrouponId string
	Addr      []string
}

type KafKaQueue

type KafKaQueue struct {
	Addr     []string
	Producer sarama.SyncProducer
}

type SimpleConsumer

type SimpleConsumer struct {
	Cfg  *ConsumerCfg
	Work Worker
}

func (*SimpleConsumer) Run

func (consumer *SimpleConsumer) Run() error

type Worker

type Worker func(msg *protocol.EventData) error

Jump to

Keyboard shortcuts

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