kafka

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(kv sarama.KafkaVersion, ro config.Retry, tls config.TLS) multichain.Consenter

New creates a Kafka-backed consenter. Called by orderer's main.go.

Types

type Broker

type Broker interface {
	GetOffset(cp ChainPartition, req *sarama.OffsetRequest) (int64, error)
	Closeable
}

Broker allows the caller to get info on the cluster's partitions

type ChainPartition

type ChainPartition interface {
	Topic() string
	Partition() int32
	fmt.Stringer
}

ChainPartition identifies the Kafka partition the orderer interacts with.

type Closeable

type Closeable interface {
	Close() error
}

Closeable allows the shut down of the calling resource.

type Consumer

type Consumer interface {
	Recv() <-chan *sarama.ConsumerMessage
	Errors() <-chan *sarama.ConsumerError
	Closeable
}

Consumer allows the caller to receive a stream of blobs from the Kafka cluster for a specific partition.

type Producer

type Producer interface {
	Send(cp ChainPartition, payload []byte) error
	Closeable
}

Producer allows the caller to post blobs to a chain partition on the Kafka cluster.

Jump to

Keyboard shortcuts

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