kafka

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker added in v1.0.0

type Broker struct {
	ID        int32
	Connected bool
}

Broker represents a Kafka Broker.

type Monitor added in v1.0.0

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 added in v1.0.0

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

Brokers returns a list of Kafka brokers.

func (*Monitor) Close added in v1.0.0

func (m *Monitor) Close()

Close gracefully stops the Monitor.

func (*Monitor) Collect added in v1.0.0

func (m *Monitor) Collect()

Collect collects the state of Kafka.

func (*Monitor) IsHealthy added in v1.0.0

func (m *Monitor) IsHealthy() bool

IsHealthy checks the health of the Kafka cluster.

type MonitorFunc added in v1.0.0

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 added in v1.0.0

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