Skip to content

pilot-protocol/updater

Repository files navigation

updater

ci codecov License: AGPL-3.0

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.

Install

import "github.com/pilot-protocol/updater"

Usage

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.

Layout

File What it does
updater.go Updater — GitHub release polling, download, SHA verify, atomic rename.
version.go SemVer parsing and comparison.
service.go *Servicecoreapi.Service adapter. Build tag !no_updater.
service_disabled.go Stub when build tag no_updater is set.

Build tags

Tag Effect
no_updater Compiles a stub whose Start is a no-op.

License

AGPL-3.0-or-later. See LICENSE.

About

Pilot Protocol auto-updater sidecar — checks GitHub releases hourly, hot-swaps client binaries

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages