Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRuleCommentOnFile = errors.New("this comment is only valid when attached to a rule")
Functions ¶
This section is empty.
Types ¶
type AlertingRule ¶
type AlertingRule struct {
Expr PromQLExpr
For *YamlNode
KeepFiringFor *YamlNode
Labels *YamlMap
Annotations *YamlMap
Alert YamlNode
}
func (*AlertingRule) IsIdentical ¶ added in v0.50.0
func (ar *AlertingRule) IsIdentical(b *AlertingRule) bool
type ParseError ¶
type PromQLError ¶
type PromQLError struct {
Err error
// contains filtered or unexported fields
}
func (PromQLError) Error ¶
func (pqle PromQLError) Error() string
func (PromQLError) Node ¶
func (pqle PromQLError) Node() *PromQLNode
func (*PromQLError) Unwrap ¶
func (pqle *PromQLError) Unwrap() error
type PromQLExpr ¶
type PromQLExpr struct {
Value *YamlNode
SyntaxError error
Query *PromQLNode
}
func (PromQLExpr) IsIdentical ¶ added in v0.50.0
func (pqle PromQLExpr) IsIdentical(b PromQLExpr) bool
type PromQLNode ¶
type PromQLNode struct {
Expr string
Node promparser.Expr
Children []*PromQLNode
}
func DecodeExpr ¶ added in v0.2.0
func DecodeExpr(expr string) (*PromQLNode, error)
type RecordingRule ¶
type RecordingRule struct {
Expr PromQLExpr
Labels *YamlMap
Record YamlNode
}
func (*RecordingRule) IsIdentical ¶ added in v0.50.0
func (rr *RecordingRule) IsIdentical(b *RecordingRule) bool
type Rule ¶
type Rule struct {
AlertingRule *AlertingRule
RecordingRule *RecordingRule
Error ParseError
Comments []comments.Comment
Lines LineRange
}
func (Rule) Expr ¶
func (r Rule) Expr() PromQLExpr
func (Rule) IsIdentical ¶ added in v0.50.0
type YamlKeyValue ¶
type YamlMap ¶
type YamlMap struct {
Key *YamlNode
Items []*YamlKeyValue
Lines LineRange
}
func (*YamlMap) IsIdentical ¶ added in v0.50.0
Click to show internal directories.
Click to hide internal directories.