kafka

package
v1.1.1-0...-2036212 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	ID        int32
	Connected bool
}

Broker represents a Kafka Broker.

type Monitor

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

Monitor represents a Kafka cluster connection.

func New

func New(opts ...MonitorFunc) (*Monitor, error)

New creates and returns a new Monitor for a Kafka cluster.

func (*Monitor) Brokers

func (m *Monitor) Brokers() []Broker

Brokers returns a list of Kafka brokers.

func (*Monitor) Close

func (m *Monitor) Close()

Close gracefully stops the Monitor.

func (*Monitor) Collect

func (m *Monitor) Collect()

Collect collects the state of Kafka.

func (*Monitor) IsHealthy

func (m *Monitor) IsHealthy() bool

IsHealthy checks the health of the Kafka cluster.

type MonitorFunc

type MonitorFunc func(c *Monitor)

MonitorFunc represents a function that configures the Monitor.

func Brokers

func Brokers(brokers []string) MonitorFunc

Brokers configures the brokers on the Monitor.

func IgnoreGroups

func IgnoreGroups(groups []string) MonitorFunc

IgnoreGroups configures the group patterns to be ignored on the Monitor.

func IgnoreTopics

func IgnoreTopics(topics []string) MonitorFunc

IgnoreTopics configures the topic patterns to be ignored on the Monitor.

func Log

func Log(log log15.Logger) MonitorFunc

Log configures the logger on the Monitor.

func StateChannel

func StateChannel(ch chan interface{}) MonitorFunc

StateChannel configures the offset manager channel on the Monitor.

Jump to

Keyboard shortcuts

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