Skip to content

BinaryExpr🔗

Represents a binary operation expression.

Definition🔗

type BinaryExpr struct {
    Type string `json:"type"`
    Op promql.BinaryOp `json:"op"`
    Left promql.Expr `json:"left"`
    Right promql.Expr `json:"right"`
    // https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching-keywords
    MatchType *promql.BinaryExprMatchType `json:"matchType,omitempty"`
    MatchLabels []string `json:"matchLabels,omitempty"`
    GroupModifier *promql.BinaryExprGroupModifier `json:"groupModifier,omitempty"`
    GroupLabels []string `json:"groupLabels,omitempty"`
}

Methods🔗

Validate🔗

Validate checks all the validation constraints that may be defined on BinaryExpr fields for violations and returns them.

func (binaryExpr *BinaryExpr) Validate() error