$ account crazy-max
Diun is a Go-based CLI daemon that monitors container image registries and notifies users when new versions or updates are available. It operates by polling container runtime environments (Docker, Swarm, Kubernetes, Nomad, containerd), or reading from YAML or Dockerfiles, to discover images, then compares their registry digests (or manifest list platform-specific digests) against a local bbolt database. When a change is detected, it sends notifications through one or more of 20+ channels (Slack, Discord, Telegram, email, webhook, MQTT, etc.). The system also exposes Prometheus metrics, a gRPC interface for image lifecycle management, and supports health checks via healthchecks.io. The architecture is modular: a scheduler component (cron-based with jitter and worker pool) triggers jobs that walk through configured providers (each implementing a `Handler` interface returning a list of `model.Image`), then for each image the registry client fetches the latest manifest (with tag sorting and filtering), compares it against the stored digest, updates the database, and dispatches notification entries through a notifier chain. The design cleanly separates provider discovery, registry inspection, state persistence, and notification delivery into independent packages. External dependencies include container runtime SDKs (Docker, containerd, Kubernetes, Nomad), the OCI distribution registry API, and each notification service's client library. The codebase is well-structured with strong test coverage, configuration via YAML and environment variables, and comprehensive CI/CD including e2e tests, static analysis, and vulnerability scanning. It is actively maintained with frequent releases and responsive issue triage. Primary entry points are `cmd/serve.go` (main daemon), `cmd/healthcheck.go`, `cmd/image.go` (gRPC-based image management), and `cmd/notif.go` (test notifications).