Documentation ¶
Index ¶
- func DedupeMetadata(seriesMeta []block.SeriesMeta, tagOptions models.TagOptions) (models.Tags, []block.SeriesMeta)
- func FlattenMetadata(meta block.Metadata, seriesMeta []block.SeriesMeta) []block.SeriesMeta
- func FormatFloat(value float64) string
- func FormatFloatToBytes(value float64) []byte
- func GroupSeries(matchingTags [][]byte, without bool, opName []byte, metas []block.SeriesMeta) ([][]int, []block.SeriesMeta)
- func UniqueCount(names []string) int
- type FloatHeap
- type StaticParams
- type ValueIndexPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DedupeMetadata ¶
func DedupeMetadata( seriesMeta []block.SeriesMeta, tagOptions models.TagOptions, ) (models.Tags, []block.SeriesMeta)
DedupeMetadata applies all shared tags from Metadata to each SeriesMeta
func FlattenMetadata ¶
func FlattenMetadata( meta block.Metadata, seriesMeta []block.SeriesMeta, ) []block.SeriesMeta
FlattenMetadata applies all shared tags from Metadata to each SeriesMeta
func FormatFloat ¶
FormatFloat converts float values to formatted strings
func FormatFloatToBytes ¶
FormatFloatToBytes converts float values to formatted byte arrays
func GroupSeries ¶
func GroupSeries( matchingTags [][]byte, without bool, opName []byte, metas []block.SeriesMeta, ) ([][]int, []block.SeriesMeta)
GroupSeries groups series by tags. It gives a list of seriesMeta for the grouped series, and a list of corresponding buckets which signify which series are mapped to which grouped outputs
func UniqueCount ¶
UniqueCount calculates the number of unique strings in a given slice.
Types ¶
type FloatHeap ¶
type FloatHeap struct {
// contains filtered or unexported fields
}
FloatHeap is a heap that can be given a maximum size
func NewFloatHeap ¶
NewFloatHeap builds a new FloatHeap based on first parameter and a capacity given by second parameter. Zero and negative values for maxSize provide an unbounded FloatHeap
func (FloatHeap) Flush ¶
func (fh FloatHeap) Flush() []ValueIndexPair
Flush flushes the float heap and resets it. Does not guarantee order.
func (FloatHeap) Peek ¶
func (fh FloatHeap) Peek() (ValueIndexPair, bool)
Peek reveals the top value of the heap without mutating the heap.
type StaticParams ¶
type StaticParams string
StaticParams is a simple string Params implementation, useful for when no data other than OpType is needed.
func (StaticParams) OpType ¶
func (s StaticParams) OpType() string
OpType simply returns s for StaticParams.
type ValueIndexPair ¶
ValueIndexPair is a pair of float value and index at which it exists