Disponible

amalgame-service

SIGTERM / SIGINT + Windows SCM dispatcher.

amc package add service GitHub ↗ ← Retour à l'écosystème

Vue d'ensemble

Intégration daemon/service cross-OS. Sous Linux/macOS : gestion propre des signaux SIGTERM et SIGINT pour shutdown gracieux. Sous Windows : dispatcher SCM natif via sc.exe, sans NSSM ni wrapper tiers.

Caractéristiques

  • SIGTERM / SIGINT handlers cross-OS
  • Windows Service Control Manager natif (depuis v0.2)
  • Génération du fichier .service systemd (Linux)
  • Installation/désinstallation via install.sh / install.ps1
  • Drain in-flight requests avant exit

Exemple

Exemple minimal d'utilisation — recopiable tel quel après l'install.

amc package add service

let svc = Service.New("my-app")
svc.OnStart(fn() { startWebServer() })
svc.OnStop(fn()  { drainAndShutdown() })
svc.Run()

En bref

Packages liés