consumer

package
v0.0.0-...-f9573de Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	ConsumerGroup() string
	InitialOffset() int64
	ProcessingTimeout() time.Duration
	ZookeeperURL() string
	ZookeeperChroot() string
	Topics() []string
}

Config represents the configuration required for a consumer service

type Consumer

type Consumer interface {
	Start() chan Message
	Commit(to Message) error
}

Consumer ...

func New

func New(config Config) Consumer

New ...

type DefaultConsumerConfig

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

DefaultConsumerConfig is a default Config implementation

func (DefaultConsumerConfig) ConsumerGroup

func (c DefaultConsumerConfig) ConsumerGroup() string

ConsumerGroup implements Config.ConsumerGroup

func (DefaultConsumerConfig) InitialOffset

func (c DefaultConsumerConfig) InitialOffset() int64

InitialOffset implements Config.InitialOffset

func (DefaultConsumerConfig) ProcessingTimeout

func (c DefaultConsumerConfig) ProcessingTimeout() time.Duration

ProcessingTimeout implements Config.ProcessingTimeout

func (DefaultConsumerConfig) Topics

func (c DefaultConsumerConfig) Topics() []string

Topics implements Config.Topics

func (DefaultConsumerConfig) ZookeeperChroot

func (c DefaultConsumerConfig) ZookeeperChroot() string

ZookeeperChroot implements Config.ZookeeperChroot

func (DefaultConsumerConfig) ZookeeperURL

func (c DefaultConsumerConfig) ZookeeperURL() string

ZookeeperURL implements Config.ZookeeperURL

type Message

type Message interface {
	Key() []byte
	Value() []byte
	Partition() int32
	Offset() int64
}

Message ...

Jump to

Keyboard shortcuts

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