Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-d committed Nov 18, 2024
1 parent 237eaa6 commit e279e79
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pkg/kafka/partition/reader_refactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const (
)

type ReaderIfc interface {
Client() *kgo.Client
Topic() string
Partition() int32
ConsumerGroup() string
Expand All @@ -48,7 +47,7 @@ type refactoredReaderMetrics struct {
lastCommittedOffset prometheus.Gauge
}

func newRefactoredReaderMetrics(r prometheus.Registerer, partitionID int32) *refactoredReaderMetrics {
func newRefactoredReaderMetrics(r prometheus.Registerer) *refactoredReaderMetrics {
return &refactoredReaderMetrics{
fetchWaitDuration: promauto.With(r).NewHistogram(prometheus.HistogramOpts{
Name: "loki_kafka_reader_fetch_wait_duration_seconds",
Expand Down Expand Up @@ -104,16 +103,11 @@ func NewRefactoredReader(
topic: topic,
partitionID: partitionID,
consumerGroup: consumerGroup,
metrics: newRefactoredReaderMetrics(reg, partitionID),
metrics: newRefactoredReaderMetrics(reg),
logger: logger,
}
}

// Client returns the underlying Kafka client
func (r *RefactoredReader) Client() *kgo.Client {
return r.client
}

// Topic returns the topic being read
func (r *RefactoredReader) Topic() string {
return r.topic
Expand Down

0 comments on commit e279e79

Please sign in to comment.