package
0.2.2
Repository: https://github.com/anathatech/cosmosd.git
Documentation: pkg.go.dev

# Functions

DoUpgrade will be called after the log message has been parsed and the process has terminated.
DownloadBinary will grab the binary and place it in the proper directory.
EnsureBinary ensures the file exists and is executable, or returns an error.
GetConfigFromEnv will read the environmental variables into a config and then validate it is reasonable.
GetDownloadURL will check if there is an arch-dependent binary specified in Info.
LaunchProcess runs a subprocess and returns when the subprocess exits, either when it dies, or *after* a successful upgrade.
MarkExecutable will try to set the executable bits if not already set Fails if file doesn't exist or we cannot set those bits.
Run is the main loop, but returns an error.
WaitForUpdate will listen to the scanner until a line matches upgradeRegexp.
WaitForUpgradeOrExit listens to both output streams of the process, as well as the process state itself When it returns, the process is finished and all streams have closed.

# Structs

Config is the information passed in to control the daemon.
UpgradeConfig is expected format for the info field to allow auto-download.
UpgradeInfo is the details from the regexp.
WaitResult is used to wrap feedback on cmd state with some mutex logic.