lib_gc_kafka_client

package
v0.0.0-...-e28984d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const FIRST_TOPIC_PARTITION = -1

Variables

This section is empty.

Functions

func CloseCurrentClient

func CloseCurrentClient() error

func GetOffsetNewestMark

func GetOffsetNewestMark() int64

func GetOffsetOldestMark

func GetOffsetOldestMark() int64

Types

type KafkaClientFactory_I

type KafkaClientFactory_I interface {
	GetNewClient() (KafkaClient_I, error)
}
var KafkaClientFactory KafkaClientFactory_I

type KafkaClient_I

type KafkaClient_I interface {
	Close() error
	IsClosed() bool
	StartAsyncProducer(topic string) (chan<- []byte, <-chan *error, error)
	StartSyncProducer(topic string) (chan<- []byte, <-chan *error, error)
	StartConsumer(message_processor MessageProcessor, topic string, partition int32, offset int64) (<-chan *error, error)
	GetPartitionsFromATopic(string) ([]int32, error)
	GetOldestOffset(topic string, partiionID int32) (int64, error)
	GetNewestOffset(topic string, partiionID int32) (int64, error)
	GetOffsetByPartition(topic string) (map[int32]int64, map[int32]int64, error)
}

type MessageProcessor

type MessageProcessor interface {
	ProcessMessage(message []byte, partition int32, offset int64) error
}

Jump to

Keyboard shortcuts

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