kafka

package
v1.0.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2017 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Source Files

  • broker.go
  • chain_partition.go
  • consumer.go
  • log.go
  • orderer.go
  • partitioner.go
  • producer.go
  • util.go

Jump to

Keyboard shortcuts

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