kafka

package
v0.0.0-...-37ca617 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TopicMembership = Topic{/* contains filtered or unexported fields */}
	TopicLiquidity  = Topic{/* contains filtered or unexported fields */}
	TopicOperation  = Topic{/* contains filtered or unexported fields */}
)

Functions

func Consume

func Consume(ctx context.Context, topicNames []Topic, batchHandler ConsumeBatchHandler) error

func EnvAddrsVersion

func EnvAddrsVersion() (addrs []string, version sarama.KafkaVersion)

func Produce

func Produce(topic Topic, key, value sarama.Encoder) error

func Unuse

func Unuse() (err error)

func UseConsumer

func UseConsumer(addrs []string, version sarama.KafkaVersion, groupId string, maxInterval time.Duration, batchSize int) (err error)

func UseProducer

func UseProducer(addrs []string, version sarama.KafkaVersion) (err error)

func Version

func Version(v string) (sarama.KafkaVersion, error)

Types

type ConsumeBatchHandler

type ConsumeBatchHandler func(msgs []*sarama.ConsumerMessage) (markFlags []bool, errs []error)

type Topic

type Topic struct {
	// contains filtered or unexported fields
}

func TopicName

func TopicName(topic string) (Topic, error)

func (Topic) Equal

func (t Topic) Equal(s string) bool

func (Topic) String

func (t Topic) String() string

Jump to

Keyboard shortcuts

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