forked from digitalocean/firebolt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmessageconsumer.go
More file actions
18 lines (16 loc) · 761 Bytes
/
messageconsumer.go
File metadata and controls
18 lines (16 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package kafka
import "github.com/confluentinc/confluent-kafka-go/kafka"
// MessageConsumer is an interface for 'kafka.Consumer' to make it mockable.
// if that interface changes, the mock can be regenerated from this dir with:
//
// mockery -name MessageConsumer -inpkg .
type MessageConsumer interface {
Subscribe(string, kafka.RebalanceCb) error
Events() chan kafka.Event
Assign(partitions []kafka.TopicPartition) error
Unassign() (err error)
Committed(partitions []kafka.TopicPartition, timeoutMs int) (offsets []kafka.TopicPartition, err error)
QueryWatermarkOffsets(topic string, partition int32, timeoutMs int) (low, high int64, err error)
GetMetadata(topic *string, allTopics bool, timeoutMs int) (*kafka.Metadata, error)
Close() (err error)
}