MCPcopy Create free account
hub / github.com/prometheus/common / StatusAt

Method StatusAt

model/alert.go:83–88  ·  view source on GitHub ↗

StatusAt returns the status of the alert at the given timestamp.

(ts time.Time)

Source from the content-addressed store, hash-verified

81
82// StatusAt returns the status of the alert at the given timestamp.
83func (a *Alert) StatusAt(ts time.Time) AlertStatus {
84 if a.ResolvedAt(ts) {
85 return AlertResolved
86 }
87 return AlertFiring
88}
89
90// Validate checks whether the alert data is inconsistent.
91func (a *Alert) Validate() error {

Callers 2

StatusMethod · 0.95
TestAlertFunction · 0.95

Calls 1

ResolvedAtMethod · 0.95

Tested by 1

TestAlertFunction · 0.76