Documentation ¶
Index ¶
- Constants
- func DedupeMetadata(seriesMeta []block.SeriesMeta) (models.Tags, []block.SeriesMeta)
- func FlattenMetadata(meta block.Metadata, seriesMeta []block.SeriesMeta) []block.SeriesMeta
- func HashFunc(on bool, names ...string) func(models.Tags) uint64
- func NewLogicalOp(opType string, lNode parser.NodeID, rNode parser.NodeID, ...) (parser.Params, error)
- type VectorMatchCardinality
- type VectorMatching
Constants ¶
const AndType = "and"
AndType uses values from left hand side for which there is a value in right hand side with exactly matching label sets. Other elements are replaced by NaNs. The metric name and values are carried over from the left-hand side.
const OrType = "or"
OrType uses all values from left hand side, and appends values from the right hand side which do not have corresponding tags on the right
const UnlessType = "unless"
UnlessType uses all values from lhs which do not exist in rhs
Variables ¶
This section is empty.
Functions ¶
func DedupeMetadata ¶ added in v0.4.1
func DedupeMetadata( seriesMeta []block.SeriesMeta, ) (models.Tags, []block.SeriesMeta)
DedupeMetadata applies all shared tags from Metadata to each SeriesMeta
func FlattenMetadata ¶ added in v0.4.1
func FlattenMetadata( meta block.Metadata, seriesMeta []block.SeriesMeta, ) []block.SeriesMeta
FlattenMetadata applies all shared tags from Metadata to each SeriesMeta
Types ¶
type VectorMatchCardinality ¶
type VectorMatchCardinality int
VectorMatchCardinality describes the cardinality relationship of two Vectors in a binary operation.
const ( // CardOneToOne is used for one-one relationship CardOneToOne VectorMatchCardinality = iota // CardManyToOne is used for many-one relationship CardManyToOne // CardOneToMany is used for one-many relationship CardOneToMany // CardManyToMany is used for many-many relationship CardManyToMany )
type VectorMatching ¶
type VectorMatching struct { // The cardinality of the two Vectors. Card VectorMatchCardinality // MatchingLabels contains the labels which define equality of a pair of // elements from the Vectors. MatchingLabels []string // On includes the given label names from matching, // rather than excluding them. On bool // Include contains additional labels that should be included in // the result from the side with the lower cardinality. Include []string }
VectorMatching describes how elements from two Vectors in a binary operation are supposed to be matched.