Skip to content

Releases: automa-saga/daemonkit

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 07 Aug 01:34
6426f32

0.4.0 (2026-08-07)

Features

  • add optional event metadata field (#6) (6426f32)

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 18 Jul 05:34
03534a4

0.3.0 (2026-07-18)

Features

  • add Go and Group goroutine-safety helpers for monitors and add supervisor panic recovery (#5) (03534a4)

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 15 Jul 06:10
9da2c27

0.2.0 (2026-07-15)

Features

  • eventlog: add WARN level for Warning-severity milestones (#3) (9da2c27)

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 11 Jul 03:13
a518e96

0.1.1 (2026-07-11)

Bug Fixes

  • deps: upgrade Go to 1.26.5 to remediate SNYK-GOLANG-STDOS-17905377 (#2) (a518e96)

v0.1.0

Choose a tag to compare

@leninmehedy leninmehedy released this 19 Jun 05:02
a0aa7f9

daemonkit v0.1.0

First public release of daemonkit — a small, framework-neutral kernel for
building long-running Go daemons. It factors out the concerns every production
daemon re-implements (and usually gets slightly wrong): supervising work loops,
exposing health to operators, gating startup on host preconditions, and keeping
a durable audit trail — with a deliberately minimal dependency surface
(standard library + errorx + golang.org/x/sync/errgroup).

Packages

Package Import Responsibility
daemonkit github.com/automa-saga/daemonkit Supervised monitor loop, Unix-socket HTTP control plane, probe framework, sd_notify + watchdog
eventlog github.com/automa-saga/daemonkit/eventlog Append-only JSONL milestone/audit logger
filepruner github.com/automa-saga/daemonkit/filepruner Strategy-driven retention pruning of files

The three packages are independent and can be adopted individually.

Highlights

  • Supervised monitorsSupervisedMonitor runs each MonitorRunner in a
    restart loop with exponential back-off (5 s → 5 min cap), stable-run reset, and
    a MonitorDegraded escalation after repeated crashes. Clean shutdown vs. crash
    is unambiguous.
  • Operator-first control plane — a net/http server on a Unix domain socket
    exposes /health (liveness) and /status (live per-monitor state via an
    injected StatusFn), plus component-scoped routes. Local-only by construction,
    no port or auth to manage.
  • Health-carrying heartbeat — opt-in periodic MonitorHeartbeat records
    (with healthy + connectivity details for ConnectivityMonitors), so remote
    observability can alert on the absence of a signal — catching the
    alive-but-wedged case that liveness alone misses.
  • Probe framework — concurrent prerequisite checks (Probe,
    CompositeProbe, built-in disk probes) that fail before partial work with a
    stable, operator-actionable reason/resolution.
  • systemd integrationNotifyReady / NotifyStopping, plus an opt-in
    Watchdog keepalive for WatchdogSec= units (no go-systemd dependency).
  • Audit & retentioneventlog writes fsync'd, append-only JSONL
    milestones with required-field validation; filepruner enforces age/size
    retention with a hard cap and protects files whose eligibility is uncertain.
  • Backend-agnostic logging — drives log/slog; silent by default
    (slog.DiscardHandler), pluggable into any handler (e.g. logx for
    zerolog + lumberjack) and exportable to OTLP via a local collector.

Requirements

  • Go 1.26+

Install

go get github.com/automa-saga/daemonkit@v0.1.0