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

Method String

model/alert.go:55–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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