Documentation ¶
Index ¶
- Constants
- Variables
- type AggregateSettings
- type AlertsSettings
- type AnnotationSettings
- type BitBucket
- type CI
- type Check
- type CheckSettings
- type Checks
- type Config
- type ContextCommandKey
- type ContextCommandVal
- type CostSettings
- type GitHub
- type Match
- type MatchAnnotation
- type MatchLabel
- type Parser
- type PrometheusConfig
- type RejectSettings
- type Repository
- type Rule
Constants ¶
View Source
const ( AlertingRuleType = "alerting" RecordingRuleType = "recording" InvalidRuleType = "invalid" )
Variables ¶
View Source
var ( CommandKey ContextCommandKey = "command" CICommand ContextCommandVal = "ci" LintCommand ContextCommandVal = "lint" WatchCommand ContextCommandVal = "watch" )
Functions ¶
This section is empty.
Types ¶
type AggregateSettings ¶
type AlertsSettings ¶
type AnnotationSettings ¶
type Check ¶ added in v0.23.0
type Check struct { Name string `hcl:",label" json:"name"` Body hcl.Body `hcl:",remain" json:"-"` }
func (Check) Decode ¶ added in v0.23.0
func (c Check) Decode() (s CheckSettings, err error)
func (Check) MarshalJSON ¶ added in v0.23.0
type CheckSettings ¶ added in v0.23.0
type CheckSettings interface {
Validate() error
}
type Config ¶
type Config struct { CI *CI `hcl:"ci,block" json:"ci,omitempty"` Parser *Parser `hcl:"parser,block" json:"parser,omitempty"` Repository *Repository `hcl:"repository,block" json:"repository,omitempty"` Prometheus []PrometheusConfig `hcl:"prometheus,block" json:"prometheus,omitempty"` Checks *Checks `hcl:"checks,block" json:"checks,omitempty"` Check []Check `hcl:"check,block" json:"check,omitempty"` Rules []Rule `hcl:"rule,block" json:"rules,omitempty"` PrometheusServers []*promapi.FailoverGroup `json:"-"` }
func (*Config) DisableOnlineChecks ¶ added in v0.7.0
func (cfg *Config) DisableOnlineChecks()
func (*Config) GetChecksForRule ¶
func (*Config) SetDisabledChecks ¶
type ContextCommandKey ¶ added in v0.7.1
type ContextCommandKey string
type ContextCommandVal ¶ added in v0.7.1
type ContextCommandVal string
type CostSettings ¶
type Match ¶
type Match struct { Path string `hcl:"path,optional" json:"path,omitempty"` Name string `hcl:"name,optional" json:"name,omitempty"` Kind string `hcl:"kind,optional" json:"kind,omitempty"` For string `hcl:"for,optional" json:"for,omitempty"` Label *MatchLabel `hcl:"label,block" json:"label,omitempty"` Annotation *MatchAnnotation `hcl:"annotation,block" json:"annotation,omitempty"` Command *ContextCommandVal `hcl:"command,optional" json:"command,omitempty"` }
type MatchAnnotation ¶ added in v0.7.0
type MatchLabel ¶
type Parser ¶ added in v0.17.0
type Parser struct {
Relaxed []string `hcl:"relaxed,optional" json:"relaxed,omitempty"`
}
func (Parser) CompileRelaxed ¶ added in v0.17.0
type PrometheusConfig ¶
type PrometheusConfig struct { Name string `hcl:",label" json:"name"` URI string `hcl:"uri" json:"uri"` Failover []string `hcl:"failover,optional" json:"failover,omitempty"` Timeout string `hcl:"timeout" json:"timeout"` Concurrency int `hcl:"concurrency,optional" json:"concurrency"` RateLimit int `hcl:"rateLimit,optional" json:"rateLimit"` Cache int `hcl:"cache,optional" json:"cache"` Paths []string `hcl:"paths,optional" json:"paths,omitempty"` Required bool `hcl:"required,optional" json:"required"` }
type RejectSettings ¶
type RejectSettings struct { Regex string `hcl:",label" json:"key,omitempty"` LabelKeys bool `hcl:"label_keys,optional" json:"label_keys,omitempty"` LabelValues bool `hcl:"label_values,optional" json:"label_values,omitempty"` AnnotationKeys bool `hcl:"annotation_keys,optional" json:"annotation_keys,omitempty"` AnnotationValues bool `hcl:"annotation_values,optional" json:"annotation_values,omitempty"` Severity string `hcl:"severity,optional" json:"severity,omitempty"` }
type Repository ¶
type Rule ¶
type Rule struct { Match []Match `hcl:"match,block" json:"match,omitempty"` Ignore []Match `hcl:"ignore,block" json:"ignore,omitempty"` Aggregate []AggregateSettings `hcl:"aggregate,block" json:"aggregate,omitempty"` Annotation []AnnotationSettings `hcl:"annotation,block" json:"annotation,omitempty"` Label []AnnotationSettings `hcl:"label,block" json:"label,omitempty"` Cost *CostSettings `hcl:"cost,block" json:"cost,omitempty"` Alerts *AlertsSettings `hcl:"alerts,block" json:"alerts,omitempty"` Reject []RejectSettings `hcl:"reject,block" json:"reject,omitempty"` }
Click to show internal directories.
Click to hide internal directories.