Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadBinary ¶
DownloadBinary downloads a binary from a remote location and saves it to disk
func Init ¶
func Init(version *LocalVersionInfo)
func InitFromString ¶
Types ¶
type LocalVersionInfo ¶
type LocalVersionInfo struct { Name string `json:"name"` Version string `json:"version"` VersionCheckEndpoint string `json:"version_check_endpoint"` }
LocalVersionInfo contains version info for the locally running binary
func CurrentVersion ¶
func CurrentVersion() LocalVersionInfo
type OSPackage ¶
type OSPackage struct { URL string `json:"url"` OS string `json:"os"` Arch string `json:"arch"` Checksum string `json:"checksum"` }
OSPackage contains OS specific info for updating the correct version of the binary
func SelectVersionByOS ¶
type RemoteVersionInfo ¶
type RemoteVersionInfo struct { Version string `json:"version"` OSPackages []OSPackage `json:"os_packages"` }
RemoteVersionInfo contains version info for the published remote binary
func CheckVersion ¶
func CheckVersion() (bool, *RemoteVersionInfo, error)
Click to show internal directories.
Click to hide internal directories.