Skip to content

Commit

Permalink
Rename type
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskorn committed May 20, 2024
1 parent 17bb03c commit 81b1975
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/storegateway/series_refs_streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package storegateway

import "sync"

type iteratorFactory func(strategy seriesIteratorStrategy) iterator[seriesChunkRefsSet]
type seriesChunkRefsIteratorFactory func(strategy seriesIteratorStrategy) iterator[seriesChunkRefsSet]

// chunksStreamingCachingSeriesChunkRefsSetIterator is an iterator used while streaming chunks from store-gateways to queriers.
//
Expand All @@ -13,7 +13,7 @@ type iteratorFactory func(strategy seriesIteratorStrategy) iterator[seriesChunkR
type chunksStreamingCachingSeriesChunkRefsSetIterator struct {
strategy seriesIteratorStrategy
postingsSetsIterator *postingsSetsIterator
factory iteratorFactory
factory seriesChunkRefsIteratorFactory
it iterator[seriesChunkRefsSet]

expectSingleBatch bool
Expand All @@ -24,7 +24,7 @@ type chunksStreamingCachingSeriesChunkRefsSetIterator struct {
cachedBatch seriesChunkRefsSet
}

func newChunksStreamingCachingSeriesChunkRefsSetIterator(strategy seriesIteratorStrategy, postingsSetsIterator *postingsSetsIterator, factory iteratorFactory) *chunksStreamingCachingSeriesChunkRefsSetIterator {
func newChunksStreamingCachingSeriesChunkRefsSetIterator(strategy seriesIteratorStrategy, postingsSetsIterator *postingsSetsIterator, factory seriesChunkRefsIteratorFactory) *chunksStreamingCachingSeriesChunkRefsSetIterator {
expectSingleBatch := !postingsSetsIterator.HasMultipleBatches()
var initialStrategy seriesIteratorStrategy

Expand Down Expand Up @@ -107,7 +107,7 @@ func newStreamingSeriesIterators() *streamingSeriesIterators {
}
}

func (i *streamingSeriesIterators) wrapIterator(strategy seriesIteratorStrategy, postingsSetsIterator *postingsSetsIterator, factory iteratorFactory) iterator[seriesChunkRefsSet] {
func (i *streamingSeriesIterators) wrapIterator(strategy seriesIteratorStrategy, postingsSetsIterator *postingsSetsIterator, factory seriesChunkRefsIteratorFactory) iterator[seriesChunkRefsSet] {
it := newChunksStreamingCachingSeriesChunkRefsSetIterator(strategy, postingsSetsIterator, factory)

i.mtx.Lock()
Expand All @@ -129,5 +129,5 @@ func (i *streamingSeriesIterators) prepareForChunksStreamingPhase() []iterator[s
}

type seriesChunkRefsIteratorWrapper interface {
wrapIterator(strategy seriesIteratorStrategy, postingsSetsIterator *postingsSetsIterator, factory iteratorFactory) iterator[seriesChunkRefsSet]
wrapIterator(strategy seriesIteratorStrategy, postingsSetsIterator *postingsSetsIterator, factory seriesChunkRefsIteratorFactory) iterator[seriesChunkRefsSet]
}

0 comments on commit 81b1975

Please sign in to comment.