Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownArchiveType = errors.New("unknown archive type") ErrNoMatchingArchitectures = errors.New("no matching architectures") ErrNoAssets = errors.New("no assets") ErrChecksumMismatch = errors.New("checksum mismatch") ErrUnsupportedChecksumFormat = errors.New("unsupported checksum format") ErrTimeoutExceeded = errors.New("timeout exceeded") )
View Source
var (
ErrReleaseNotFound = errors.New("release not found")
)
View Source
var RunAt time.Time
View Source
var RunAtEpoch string
Functions ¶
func PerformUpgrade ¶ added in v0.42.0
func PerformUpgrade() error
func PrintIfUpgradeAvailable ¶ added in v0.42.0
func PrintIfUpgradeAvailable()
PrintToStdErrIfUpgradeAvailable prints the update info to stderr if available
func VerifyCanUpgrade ¶ added in v0.42.0
func VerifyCanUpgrade() error
Types ¶
type Build ¶
type Build struct { Version string `json:"version,omitempty"` UpdateInfo *UpdateInfo `json:"updateInfo,omitempty"` }
Build holds details about this build of the replicated cli binary
type ClientVersions ¶ added in v0.83.2
type Option ¶ added in v0.83.2
type Option func(*UpdateChecker) error
type PingResponse ¶ added in v0.83.2
type PingResponse struct { ClientIP string `json:"client_ip"` ClientVersions ClientVersions `json:"client_versions"` }
type UpdateChecker ¶ added in v0.83.2
type UpdateChecker struct {
// contains filtered or unexported fields
}
func NewUpdateChecker ¶ added in v0.83.2
func NewUpdateChecker(version string, homebrewFormula string) (*UpdateChecker, error)
func (UpdateChecker) CanSupportUpgrade ¶ added in v0.83.2
func (s UpdateChecker) CanSupportUpgrade() (bool, error)
func (UpdateChecker) ExternalUpgradeCommand ¶ added in v0.83.2
func (s UpdateChecker) ExternalUpgradeCommand() string
func (UpdateChecker) GetUpdateInfo ¶ added in v0.83.2
func (s UpdateChecker) GetUpdateInfo() (*UpdateInfo, error)
GetUpdateInfo will return the latest version
func (UpdateChecker) Upgrade ¶ added in v0.83.2
func (s UpdateChecker) Upgrade() error
type UpdateInfo ¶ added in v0.83.2
type UpdateInfo struct { LatestVersion string `json:"latestVersion"` LatestReleaseAt *time.Time `json:"latestReleaseAt"` CheckedAt *time.Time `json:"checkedAt"` CanUpgradeInPlace bool `json:"canUpgradeInPlace"` ExternalUpgradeCommand string `json:"externalUpgradeCommand"` }
func UpdateInfoFromVersions ¶ added in v0.83.2
func UpdateInfoFromVersions(currentVersion string, latestVersion *VersionInfo) (*UpdateInfo, error)
type VersionInfo ¶ added in v0.83.2
type VersionInfo struct {
Version string `json:"version"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.