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

Method String

model/alert.go:54–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func (a *Alert) String() string {
55 s := fmt.Sprintf("%s[%s]", a.Name(), a.Fingerprint().String()[:7])
56 if a.Resolved() {
57 return s + "[resolved]"
58 }
59 return s + "[active]"
60}
61
62// Resolved returns true iff the activity interval ended in the past.
63func (a *Alert) Resolved() bool {

Callers

nothing calls this directly

Calls 4

NameMethod · 0.95
FingerprintMethod · 0.95
ResolvedMethod · 0.95
StringMethod · 0.65

Tested by

no test coverage detected