kafka

package
Version: v0.0.0-...-6719cd2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package kafka implements a Kafka client as a blog.AkutanLog.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

Log is a client to Kafka. It implements blog.AkutanLog. TODO: many of these methods are misbehaved in that they handle errors differently than described in blog.AkutanLog.

func NewLog

func NewLog(ctx context.Context, cfg *config.Akutan, brokers discovery.Locator) (*Log, error)

NewLog constructs a new Log.

func (*Log) Append

func (aLog *Log) Append(ctx context.Context, msgs [][]byte) ([]blog.Index, error)

Append implements the method from blog.AkutanLog.

func (*Log) AppendSingle

func (aLog *Log) AppendSingle(ctx context.Context, data []byte) (blog.Index, error)

AppendSingle implements the method from blog.AkutanLog.

func (*Log) Discard

func (aLog *Log) Discard(ctx context.Context, startIndex blog.Index) error

Discard implements the method from blog.AkutanLog.

func (*Log) Info

func (aLog *Log) Info(ctx context.Context) (*blog.Info, error)

Info implements the method from blog.AkutanLog.

func (*Log) InfoStream

func (aLog *Log) InfoStream(ctx context.Context, infoCh chan<- *blog.Info) error

InfoStream implements the method from blog.AkutanLog.

func (*Log) Read

func (aLog *Log) Read(ctx context.Context, startIndex blog.Index, entriesCh chan<- []blog.Entry) error

Read implements the method from blog.AkutanLog.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL