consolidators

package
v0.15.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromIdentTagIteratorToTags

func FromIdentTagIteratorToTags(
	identTags ident.TagIterator,
	tagOptions models.TagOptions,
) (models.Tags, error)

FromIdentTagIteratorToTags converts ident tags to coordinator tags.

Types

type MatchOptions

type MatchOptions struct {
	// MatchType is the equality matching type by which to compare series.
	MatchType MatchType
}

MatchOptions are multi fetch matching options.

type MatchType

type MatchType uint

MatchType is a equality match type.

const (
	// MatchIDs matches series based on ID only.
	MatchIDs MatchType = iota
	// MatchTags matcher series based on tags.
	MatchTags
)

func (MatchType) String

func (t MatchType) String() string

func (*MatchType) UnmarshalYAML

func (t *MatchType) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals an ExtendedMetricsType into a valid type from string.

type MultiFetchResult

type MultiFetchResult interface {
	// Add appends series fetch results to the accumulator.
	Add(
		seriesIterators encoding.SeriesIterators,
		metadata block.ResultMetadata,
		attrs storagemetadata.Attributes,
		err error,
	)

	// FinalResult returns a series fetch result containing deduplicated series
	// iterators and their metadata, and any errors encountered.
	FinalResult() (SeriesFetchResult, error)

	// FinalResult returns a series fetch result containing deduplicated series
	// iterators and their metadata, as well as any attributes corresponding to
	// these results, and any errors encountered.
	FinalResultWithAttrs() (SeriesFetchResult, []storagemetadata.Attributes, error)

	// Close releases all resources held by this accumulator.
	Close() error
}

MultiFetchResult is a deduping accumalator for series iterators that allows merging using a given strategy.

func NewMultiFetchResult

func NewMultiFetchResult(
	fanout QueryFanoutType,
	pools encoding.IteratorPools,
	opts MatchOptions,
	tagOpts models.TagOptions,
) MultiFetchResult

NewMultiFetchResult builds a new multi fetch result.

type MultiFetchTagsResult

type MultiFetchTagsResult interface {
	// Add adds tagged ID iterators to the accumulator.
	Add(
		newIterator client.TaggedIDsIterator,
		meta block.ResultMetadata,
		err error,
	)
	// FinalResult returns a deduped list of tag iterators with
	// corresponding series IDs.
	FinalResult() (TagResult, error)
	// Close releases all resources held by this accumulator.
	Close() error
}

MultiFetchTagsResult is a deduping accumalator for tag iterators.

func NewMultiFetchTagsResult

func NewMultiFetchTagsResult() MultiFetchTagsResult

NewMultiFetchTagsResult builds a new multi fetch tags result.

type MultiTagResult

type MultiTagResult struct {
	// ID is the series ID.
	ID ident.ID
	// Iter is the tag iterator for the series.
	Iter ident.TagIterator
}

MultiTagResult represents a tag iterator with its string ID.

type QueryFanoutType

type QueryFanoutType uint

QueryFanoutType is a query fanout type.

const (
	// NamespaceInvalid indicates there is no valid namespace.
	NamespaceInvalid QueryFanoutType = iota
	// NamespaceCoversAllQueryRange indicates the given namespace covers
	// the entire query range.
	NamespaceCoversAllQueryRange
	// NamespaceCoversPartialQueryRange indicates the given namespace covers
	// a partial query range.
	NamespaceCoversPartialQueryRange
)

func (QueryFanoutType) String

func (t QueryFanoutType) String() string

type SeriesFetchResult

type SeriesFetchResult struct {
	// Metadata is the set of metadata associated with the fetch result.
	Metadata block.ResultMetadata
	// contains filtered or unexported fields
}

SeriesFetchResult is a fetch result with associated metadata.

func NewEmptyFetchResult

func NewEmptyFetchResult(
	meta block.ResultMetadata,
) SeriesFetchResult

NewEmptyFetchResult creates a new empty series fetch result.

func NewSeriesFetchResult

func NewSeriesFetchResult(
	iters encoding.SeriesIterators,
	tags []*models.Tags,
	meta block.ResultMetadata,
) (SeriesFetchResult, error)

NewSeriesFetchResult creates a new series fetch result using the given iterators.

func (*SeriesFetchResult) Close

func (r *SeriesFetchResult) Close()

Close no-ops; these should be closed by the enclosing iterator.

func (*SeriesFetchResult) Count

func (r *SeriesFetchResult) Count() int

Count returns the total number of contained series iterators.

func (*SeriesFetchResult) IterTagsAtIndex

func (r *SeriesFetchResult) IterTagsAtIndex(
	idx int, tagOpts models.TagOptions,
) (encoding.SeriesIterator, models.Tags, error)

IterTagsAtIndex returns the tag iterator and tags at the given index.

func (*SeriesFetchResult) SeriesIterators

func (r *SeriesFetchResult) SeriesIterators() []encoding.SeriesIterator

SeriesIterators returns the series iterators.

func (*SeriesFetchResult) Verify

func (r *SeriesFetchResult) Verify() error

Verify verifies the fetch result is valid.

type TagResult

type TagResult struct {
	// Metadata is the set of metadata associated with the fetch result.
	Metadata block.ResultMetadata
	// Tags is the list of tags for the result.
	Tags []MultiTagResult
}

TagResult is a fetch tag result with associated metadata.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL