Documentation ¶
Index ¶
- Variables
- func ReadBatch(i EntryIterator, size uint32) (*logproto.QueryResponse, uint32, error)
- type EntryIterator
- func NewNonOverlappingIterator(iterators []EntryIterator, labels string) EntryIterator
- func NewQueryClientIterator(client logproto.Querier_QueryClient, direction logproto.Direction) EntryIterator
- func NewQueryResponseIterator(ctx context.Context, resp *logproto.QueryResponse, ...) EntryIterator
- func NewReversedIter(it EntryIterator, limit uint32, preload bool) (EntryIterator, error)
- func NewStreamIterator(stream *logproto.Stream) EntryIterator
- func NewStreamsIterator(ctx context.Context, streams []*logproto.Stream, direction logproto.Direction) EntryIterator
- func NewTimeRangedIterator(it EntryIterator, mint, maxt time.Time) EntryIterator
- type HeapIterator
- type PeekingEntryIterator
Constants ¶
This section is empty.
Variables ¶
var NoopIterator = noOpIterator{}
Functions ¶
func ReadBatch ¶ added in v0.2.0
func ReadBatch(i EntryIterator, size uint32) (*logproto.QueryResponse, uint32, error)
ReadBatch reads a set of entries off an iterator.
Types ¶
type EntryIterator ¶
type EntryIterator interface { Next() bool Entry() logproto.Entry Labels() string Error() error Close() error }
EntryIterator iterates over entries in time-order.
func NewNonOverlappingIterator ¶
func NewNonOverlappingIterator(iterators []EntryIterator, labels string) EntryIterator
NewNonOverlappingIterator gives a chained iterator over a list of iterators.
func NewQueryClientIterator ¶
func NewQueryClientIterator(client logproto.Querier_QueryClient, direction logproto.Direction) EntryIterator
NewQueryClientIterator returns an iterator over a QueryClient.
func NewQueryResponseIterator ¶
func NewQueryResponseIterator(ctx context.Context, resp *logproto.QueryResponse, direction logproto.Direction) EntryIterator
NewQueryResponseIterator returns an iterator over a QueryResponse.
func NewReversedIter ¶ added in v1.3.0
func NewReversedIter(it EntryIterator, limit uint32, preload bool) (EntryIterator, error)
NewReversedIter returns an iterator which loads all or up to N entries of an existing iterator, and then iterates over them backward. Preload entries when they are being queried with a timeout.
func NewStreamIterator ¶ added in v0.2.0
func NewStreamIterator(stream *logproto.Stream) EntryIterator
NewStreamIterator iterates over entries in a stream.
func NewStreamsIterator ¶ added in v0.4.0
func NewStreamsIterator(ctx context.Context, streams []*logproto.Stream, direction logproto.Direction) EntryIterator
NewStreamsIterator returns an iterator over logproto.Stream
func NewTimeRangedIterator ¶
func NewTimeRangedIterator(it EntryIterator, mint, maxt time.Time) EntryIterator
NewTimeRangedIterator returns an iterator which filters entries by time range.
type HeapIterator ¶ added in v0.2.0
type HeapIterator interface { EntryIterator Peek() time.Time Len() int Push(EntryIterator) }
HeapIterator iterates over a heap of iterators with ability to push new iterators and get some properties like time of entry at peek and len Not safe for concurrent use
func NewHeapIterator ¶
func NewHeapIterator(ctx context.Context, is []EntryIterator, direction logproto.Direction) HeapIterator
NewHeapIterator returns a new iterator which uses a heap to merge together entries for multiple interators.
type PeekingEntryIterator ¶ added in v0.4.0
type PeekingEntryIterator interface { EntryIterator Peek() (string, logproto.Entry, bool) }
PeekingEntryIterator is an entry iterator that can look ahead an entry using `Peek` without advancing its cursor.
func NewPeekingIterator ¶ added in v0.4.0
func NewPeekingIterator(iter EntryIterator) PeekingEntryIterator
NewPeekingIterator creates a new peeking iterator.