partitioner

package
v0.0.0-...-15fa731 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kafka

type Kafka struct {
	PartitionBy string
	Partitioner sarama.Partitioner
}

func NewKafka

func NewKafka(partitionBy string) (*Kafka, error)

func (*Kafka) GetPartitionKey

func (k *Kafka) GetPartitionKey(m schema.PartitionedMetric, b []byte) ([]byte, error)

func (*Kafka) Partition

func (k *Kafka) Partition(m schema.PartitionedMetric, numPartitions int32) (int32, error)

type Partitioner

type Partitioner interface {
	Partition(schema.PartitionedMetric, int32) (int32, error)
}

Jump to

Keyboard shortcuts

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