Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
Application represents the kage application.
func NewApplication ¶
func NewApplication() *Application
NewApplication creates an instance of Application.
func (*Application) Close ¶
func (a *Application) Close()
Close gracefully shuts down the application
func (*Application) Collect ¶
func (a *Application) Collect()
Collect collects the current state of the Kafka cluster.
func (*Application) IsHealthy ¶
func (a *Application) IsHealthy() bool
IsHealthy checks the health of the Application.
func (*Application) Report ¶
func (a *Application) Report()
Report reports the current state of the MemoryStore to the Reporters.
type Monitor ¶
type Monitor interface {
// Brokers returns a list of Kafka brokers.
Brokers() []kafka.Broker
// Collect collects the state of Monitor.
Collect()
// IsHealthy checks the health of the Monitor.
IsHealthy() bool
// Close gracefully stops the Monitor client.
Close()
}
Monitor represents a Monitor monitor.
type Reporter ¶
type Reporter interface {
// ReportBrokerOffsets reports a snapshot of the broker offsets.
ReportBrokerOffsets(o *store.BrokerOffsets)
// ReportBrokerMetadata reports a snapshot of the broker metadata.
ReportBrokerMetadata(o *store.BrokerMetadata)
// ReportConsumerOffsets reports a snapshot of the consumer group offsets.
ReportConsumerOffsets(o *store.ConsumerOffsets)
}
Reporter represents a offset reporter.
type Reporters ¶
Reporters represents a set of reporters.
func (*Reporters) ReportBrokerMetadata ¶
func (rs *Reporters) ReportBrokerMetadata(v *store.BrokerMetadata)
ReportBrokerMetadata reports a snapshot of the broker metadata.
func (*Reporters) ReportBrokerOffsets ¶
func (rs *Reporters) ReportBrokerOffsets(v *store.BrokerOffsets)
ReportBrokerOffsets reports a snapshot of the broker offsets on all reporters.
func (*Reporters) ReportConsumerOffsets ¶
func (rs *Reporters) ReportConsumerOffsets(v *store.ConsumerOffsets)
ReportConsumerOffsets reports a snapshot of the consumer group offsets on all reporters.
type Store ¶
type Store interface {
// SetState adds a state into the store.
SetState(interface{}) error
// BrokerOffsets returns a snapshot of the current broker offsets.
BrokerOffsets() store.BrokerOffsets
// ConsumerOffsets returns a snapshot of the current consumer group offsets.
ConsumerOffsets() store.ConsumerOffsets
// BrokerMetadata returns a snapshot of the current broker metadata.
BrokerMetadata() store.BrokerMetadata
// Channel get the offset channel.
Channel() chan interface{}
// Close gracefully stops the Store.
Close()
}
Store represents an offset store.