Auto-updater plugin for the Pilot Protocol daemon. Polls the GitHub releases endpoint hourly, hot-swaps the daemon, pilotctl, and gateway binaries when a newer SemVer tag appears, and exits so the supervisor restarts the new copy.
import "github.com/pilot-protocol/updater"u := updater.New(updater.Config{
Repo: "TeoSlayer/pilotprotocol",
CurrentVer: "v1.10.5",
BinaryNames: []string{"pilot-daemon", "pilotctl"},
})
u.Run(ctx)The in-process Service adapter is used when embedding into the
daemon; a standalone sidecar binary built from this package is also
supported.
| File | What it does |
|---|---|
updater.go |
Updater — GitHub release polling, download, SHA verify, atomic rename. |
version.go |
SemVer parsing and comparison. |
service.go |
*Service — coreapi.Service adapter. Build tag !no_updater. |
service_disabled.go |
Stub when build tag no_updater is set. |
| Tag | Effect |
|---|---|
no_updater |
Compiles a stub whose Start is a no-op. |
AGPL-3.0-or-later. See LICENSE.