kafka_client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_EARLIEST int64 = 100

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaClient

type KafkaClient struct {
	Consumer         *kafka.Consumer
	BootstrapServers string
	TimestampMode    string
}

func NewKafkaClient

func NewKafkaClient(options Options) KafkaClient

func (*KafkaClient) ConsumerPull

func (client *KafkaClient) ConsumerPull() (KafkaMessage, kafka.Event)

func (*KafkaClient) Dispose

func (client *KafkaClient) Dispose()

func (KafkaClient) HealthCheck

func (client KafkaClient) HealthCheck() error

func (*KafkaClient) TopicAssign

func (client *KafkaClient) TopicAssign(topic string, partition int32, autoOffsetReset string,
	timestampMode string)

type KafkaMessage

type KafkaMessage struct {
	Value     map[string]float64
	Timestamp time.Time
	Offset    kafka.Offset
}

type Options

type Options struct {
	BootstrapServers string `json:"bootstrapServers"`
}

Jump to

Keyboard shortcuts

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