Documentation
¶
Overview ¶
Package agentupdate mirrors the fallbck-agent binary of the server's own release for agents that update themselves. The goreleaser archive and checksum file are fetched from GitHub once per OS/arch, the archive is verified, the binary is extracted into <data dir>/agent-releases/<version>/ and served to agents from there.
Index ¶
Constants ¶
const ReleaseBase = "https://github.com/osshield/fallbck/releases/download"
ReleaseBase is where goreleaser publishes the archives
Variables ¶
This section is empty.
Functions ¶
func ArchiveName ¶
ArchiveName is the goreleaser archive for the agent on os/arch
Types ¶
type Cache ¶
type Cache struct {
Version string
Dir string
// BaseURL is the release download base (ReleaseBase); tests point it elsewhere
BaseURL string
Client *http.Client
// contains filtered or unexported fields
}
Cache is the per-server mirror; Version is the server's release version
func (*Cache) Binary ¶
Binary returns the sha256 of the cached binary for os/arch when it is ready. When it is not, the fetch starts in the background and ok is false until it completes; the next heartbeat picks it up.
func (*Cache) Enabled ¶
Enabled reports whether the server runs a release build (dev builds never update agents)