Repository navigation
An authenticated client for the daemon's control plane, and a shutdown path that uses it.
Added
Daemon.ControlClient()andControlClient—Get(ctx, path)andPost(ctx, path)against the loopback control plane with the bearer token from the PID file. The token stays inside the client (no accessor hands it out); a non-2xx status is an error carrying the status line and a bounded body snippet, so a failed call is reported instead of read as an empty answer. Requests have a 30-second ceiling of their own (a caller's shorter deadline still wins), redirects are not followed, and a body over 8 MiB is an error instead of a silently truncated one.
Changed
Stopsends its shutdown request throughControlClient— one implementation of the address, the bearer token and the status check.
Upgrade
go get github.com/grpmsoft/daemon@v0.4.2Full changelog: https://github.com/grpmsoft/daemon/blob/main/CHANGELOG.md
Compare: v0.4.1...v0.4.2