kafka

package
v0.0.0-...-47d8c29 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "kafka"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addrs              []string
	Topic              string
	ConsumerBufferSize uint
	Kafka              *sarama.Config
}

type Consumer

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

func ConsumerFromConfig

func ConsumerFromConfig(c Config, l loggers.Logger) (*Consumer, error)

func (*Consumer) Close

func (c *Consumer) Close() error

func (*Consumer) Consume

func (c *Consumer) Consume() (<-chan result.Result, error)

type Kafka

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

func FromConfig

func FromConfig(c Config, l loggers.Logger) *Kafka

func (*Kafka) Close

func (q *Kafka) Close() error

func (*Kafka) Consumer

func (q *Kafka) Consumer() (consumer.Consumer, error)

func (*Kafka) Producer

func (q *Kafka) Producer() (producer.Producer, error)

type Producer

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

func ProducerFromConfig

func ProducerFromConfig(c Config, l loggers.Logger) (*Producer, error)

func (*Producer) Close

func (p *Producer) Close() error

func (*Producer) Produce

func (p *Producer) Produce(m message.Message) error

Jump to

Keyboard shortcuts

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