Documentation
¶
Index ¶
- Constants
- Variables
- func AssetName(tag, goos, goarch string) (string, error)
- func CompareVersions(current, latest string) (int, bool)
- func DefaultCachePath() (string, error)
- func DownloadReleaseAsset(ctx context.Context, client *http.Client, tag, assetName, destPath string) error
- func ExecutablePath() (string, string, error)
- func ExtractBinaryFromTarGz(archivePath, destDir string) (string, error)
- func ExtractBinaryFromZip(archivePath, destDir string) (string, error)
- func FetchChecksums(ctx context.Context, client *http.Client, tag string) (map[string]string, error)
- func FetchLatestTag(ctx context.Context, client *http.Client) (string, error)
- func IsNoUpdateCheckEnv() bool
- func IsUpdateAvailable(current, latest string) bool
- func NormalizeVersion(version string) string
- func ParseChecksums(data []byte) (map[string]string, error)
- func ReplaceBinary(srcPath, destPath string) (bool, error)
- func SaveCache(path string, cache *Cache) error
- func VerifySHA256(path, expected string) error
- type Cache
- type Notifier
Constants ¶
View Source
const ( RepoOwner = "avivsinai" RepoName = "agent-message-queue" RepoSlug = RepoOwner + "/" + RepoName BinaryName = "amq" ChecksumsFilename = "checksums.txt" DefaultCheckInterval = 24 * time.Hour EnvNoUpdateCheck = "AMQ_NO_UPDATE_CHECK" )
Variables ¶
View Source
var ( ErrUnsupportedOS = errors.New("unsupported operating system") ErrUnsupportedArch = errors.New("unsupported architecture") )
Functions ¶
func CompareVersions ¶
func DefaultCachePath ¶
func DownloadReleaseAsset ¶
func ExecutablePath ¶
func ExtractBinaryFromTarGz ¶
func ExtractBinaryFromZip ¶
func FetchChecksums ¶
func IsNoUpdateCheckEnv ¶
func IsNoUpdateCheckEnv() bool
func IsUpdateAvailable ¶
func NormalizeVersion ¶
func ReplaceBinary ¶
func VerifySHA256 ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.