client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(clientConfig *Config, config *sarama.Config)

Run creates and configures the Kafka consumer to consume logs from the indicated topic func Run(brokers []string, topic, consumerGroup string, isJSON bool, config *sarama.Config) {

Types

type Config

type Config struct {
	FilterRegex   string
	Brokers       []string
	Topic         string
	ConsumerGroup string
	IsJSON        bool
	LocalTZ       string
	Debug         bool
}

Config specifies the configuration to use for the consumer client

type Consumer

type Consumer struct {
	Ready       chan bool
	IsJSON      bool
	FilterRegex string
	LocalTZ     string
	Debug       bool
}

Consumer represents a Sarama consumer group consumer

func (*Consumer) Cleanup

func (consumer *Consumer) Cleanup(sarama.ConsumerGroupSession) error

Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited

func (*Consumer) ConsumeClaim

func (consumer *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages().

func (*Consumer) Setup

func (consumer *Consumer) Setup(sarama.ConsumerGroupSession) error

Setup is run at the beginning of a new session, before ConsumeClaim

Jump to

Keyboard shortcuts

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