Heartbeat
Compact availability history. Use it for monitor health and status-page evidence; retain exact values in nearby copy or a detail table.
- Purpose
- Compact ordered availability evidence for a monitor or public-status row.
- Primitive
- heartbeat.Heartbeat
- Kind
- components.KindHeartbeat
- Configuration
- Label, Caption, chronological Points, RootClass, and RootAttrs.
- Accessibility
- Figure name comes from Label; Caption remains visible; every point exposes timestamp, state, and optional latency in its SVG title. Empty points render an explicit no-data state.
Usage Example
@heartbeat.Heartbeat(heartbeat.Config{
Label: "Public API availability",
Points: []heartbeat.Point{
{At: checkedAt, State: heartbeat.StateUp, Latency: 42*time.Millisecond},
},
})No data
Absence of probes is not uptime.
No monitoring data in this period.
No data
@heartbeat.Heartbeat(heartbeat.Config{Label: "API availability"})State contract
up, degraded, down, and unknown are distinct. Color supports scanning; figure label, SVG titles, and text summary supply meaning.