consolidators

package
v0.15.17-hotfix.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 13 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 CompleteTagsResult added in v0.15.5

type CompleteTagsResult struct {
	// CompleteNameOnly indicates if the tags in this result are expected to have
	// both names and values, or only names.
	CompleteNameOnly bool
	// CompletedTag is a list of completed tags.
	CompletedTags []CompletedTag
	// Metadata describes any metadata for the operation.
	Metadata block.ResultMetadata
}

CompleteTagsResult represents a set of autocompleted tag names and values

type CompleteTagsResultBuilder added in v0.15.5

type CompleteTagsResultBuilder interface {
	// Add appends an incoming CompleteTagsResult.
	Add(*CompleteTagsResult) error
	// Build builds a completed tag result.
	Build() CompleteTagsResult
}

CompleteTagsResultBuilder is a builder that accumulates and deduplicates incoming CompleteTagsResult values.

func NewCompleteTagsResultBuilder added in v0.15.5

func NewCompleteTagsResultBuilder(
	nameOnly bool,
	opts models.TagOptions,
) CompleteTagsResultBuilder

NewCompleteTagsResultBuilder creates a new complete tags result builder.

type CompletedTag added in v0.15.5

type CompletedTag struct {
	// Name the name of the tag.
	Name []byte
	// Values is a set of possible values for the tag.
	// NB: if the parent CompleteTagsResult is set to CompleteNameOnly, this is
	// expected to be empty.
	Values [][]byte
}

CompletedTag represents a tag retrieved by a complete tags query.

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(opts models.TagOptions) 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