selfupdater

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package selfupdater is used to replace the current running binary, with a given version. It is used to sync the cli to the server version.

Index

Constants

View Source
const (
	GithubBinaryURLFormat   = "https://github.com/epinio/epinio/releases/download/%s/epinio-%s-%s"
	GithubChecksumURLFormat = "https://github.com/epinio/epinio/releases/download/%s/epinio_%s_checksums.txt"
)

Variables

View Source
var ArchToURL = map[string]string{
	"arm64": "arm64",
	"s390x": "s390x",
	"arm":   "armv7",
	"amd64": "x86_64",
}

ArchToURL is a map from GOARCH to the arch as it's set in the url of the github assets. E.g. the binary for amd64 has a suffix "x86_64" in the assets here: https://github.com/epinio/epinio/releases/tag/v1.2.0 NOTE: If we change how we name the assets, this code will break.

Functions

This section is empty.

Types

type BinaryInfo

type BinaryInfo struct {
	Path        string
	Dir         string
	Permissions fs.FileMode
}

type PosixUpdater

type PosixUpdater struct {
}

func (PosixUpdater) Update

func (u PosixUpdater) Update(targetVersion string) error

type Updater

type Updater interface {
	Update(string) error
}

type WindowsUpdater

type WindowsUpdater struct {
}

func (WindowsUpdater) Update

func (u WindowsUpdater) Update(targetVersion string) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL