kafka

package
v0.0.0-...-f5c3557 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package kafka implements an eio producer and consumer for kafka.

You must import this package separately to make these available.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	Args struct {
		// List of brokers to connect to
		Brokers []string

		// Name of the topic to read from.
		Topic string
	}
	// contains filtered or unexported fields
}

Consumer implements a kafka consumer

func (*Consumer) Close

func (c *Consumer) Close() (es cog.Errors)

Close implemnets Consumer.Close

func (*Consumer) Next

func (c *Consumer) Next() ([]byte, error)

Next implemnets Consumer.Next

type Producer

type Producer struct {
	Args struct {
		// List of brokers to connect to
		Brokers []string

		// Name of the topic to push to. This is only necessary when not
		// creating a TopicProducer.
		Topic string
	}
	// contains filtered or unexported fields
}

Producer implements a kafka producer

func (*Producer) Close

func (p *Producer) Close() (es cog.Errors)

Close implements Producer.Close

func (*Producer) Errs

func (p *Producer) Errs() <-chan error

Errs implements Producer.Errs

func (*Producer) Produce

func (p *Producer) Produce(b []byte)

Produce implements Producer.Produce

func (*Producer) ProduceTo

func (p *Producer) ProduceTo(topic string, b []byte)

ProduceTo implements TopicProducer.ProduceTo

func (*Producer) Rotate

func (p *Producer) Rotate() error

Rotate implements Producer.Rotate

Jump to

Keyboard shortcuts

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