Versions in this module Expand all Collapse all v0 v0.1.0 Oct 18, 2026 Changes in this version + const DefaultLateThreshold + const DefaultQueueSize + const DefaultRequestTimeout + const HeartbeatAlertID + const HeartbeatLabelKey + const HeartbeatLabelValue + const MaxDescriptionLength + const MaxIDLength + const MaxSourceURLLength + const MaxTitleLength + const MinHeartbeatInterval + const Version + type Alert struct + Description string + ID string + Labels map[string]string + Severity Severity + SourceURL string + Title string + type AlertStatus string + const StatusFiring + const StatusResolved + type Client struct + func New(cfg Config) (*Client, error) + func (c *Client) Fire(a Alert) error + func (c *Client) GoString() string + func (c *Client) LogValue() slog.Value + func (c *Client) Resolve(id string) error + func (c *Client) ResolveAlert(a Alert) error + func (c *Client) Run(ctx context.Context) error + func (c *Client) Status() Status + func (c *Client) String() string + type Clock interface + NewTimer func(d time.Duration) Timer + Now func() time.Time + type Config struct + AllowDisabled bool + Clock Clock + HMAC bool + HTTPClient *http.Client + HeartbeatCheck func(ctx context.Context) error + HeartbeatInterval time.Duration + HeartbeatSecret string + HeartbeatURL string + IntegrationURL string + LateThreshold time.Duration + Logger *slog.Logger + Metrics Metrics + QueueSize int + RequestTimeout time.Duration + Secret string + Store Store + func (c Config) GoString() string + func (c Config) LogValue() slog.Value + func (c Config) String() string + type ConfigError string + func (e ConfigError) Error() string + type Delivery struct + Action string + AlertID string + AlertUUID string + At time.Time + EventCount int + EventUUID string + HTTPStatus int + NotificationQueued bool + QueueSkipReason string + Status AlertStatus + ThresholdCount int + type DropReason string + const DropOverflow + const DropRejected + type Event struct + Alert Alert + Attempts int + CreatedAt time.Time + ID string + Status AlertStatus + type HeartbeatState string + const HeartbeatDisabled + const HeartbeatFailing + const HeartbeatOK + const HeartbeatUnhealthy + const HeartbeatUnknown + type HeartbeatStatus struct + LastAttempt time.Time + LastError string + LastOK time.Time + State HeartbeatState + type Metrics interface + EventDelivered func() + EventDropped func(reason DropReason) + EventRetried func() + Heartbeat func(ok bool) + QueueLength func(n int) + type SentinelError string + const ErrAlreadyRunning + const ErrInvalidAlert + func (e SentinelError) Error() string + type Severity string + const Critical + const High + const Info + const Low + const Medium + type Status struct + Delivered uint64 + Dropped uint64 + Enabled bool + Heartbeat HeartbeatStatus + LastAttempt time.Time + LastDelivery *Delivery + LastError string + LastErrorAt time.Time + LastSuccess time.Time + QueueLength int + Retries uint64 + Running bool + type Store interface + Add func(ctx context.Context, ev Event) error + Delete func(ctx context.Context, eventID string) error + Load func(ctx context.Context) ([]Event, error) + type Timer interface + C func() <-chan time.Time + Stop func() bool