-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinterfaces.go
More file actions
42 lines (31 loc) · 991 Bytes
/
interfaces.go
File metadata and controls
42 lines (31 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package kage
import (
"github.com/msales/kage/kafka"
"github.com/msales/kage/store"
)
// Store represents an offset 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()
}
// Monitor represents a Monitor 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()
}