ResolvedAt returns true iff the activity interval ended before the given timestamp.
(ts time.Time)
| 68 | // ResolvedAt returns true iff the activity interval ended before |
| 69 | // the given timestamp. |
| 70 | func (a *Alert) ResolvedAt(ts time.Time) bool { |
| 71 | if a.EndsAt.IsZero() { |
| 72 | return false |
| 73 | } |
| 74 | return !a.EndsAt.After(ts) |
| 75 | } |
| 76 | |
| 77 | // Status returns the status of the alert. |
| 78 | func (a *Alert) Status() AlertStatus { |