Documentation ¶
Index ¶
- Constants
- type AvailableUpdate
- type Checker
- type Configurable
- type ErrorInProgress
- type Fetcher
- type InvocationSource
- type Origin
- type UpdateInstaller
- func (u *UpdateInstaller) DownloadAndUnpack() (string, error)
- func (u *UpdateInstaller) InstallBlocking(installTargetPath string, args ...string) (rerr error)
- func (u *UpdateInstaller) InstallWithProgress(installTargetPath string, progressCb func(string, bool)) (*os.Process, error)
- func (u *UpdateInstaller) ShouldInstall() bool
Constants ¶
View Source
const ( CfgKeyInstallVersion = "state_tool_installer_version" InstallerName = "state-installer" + osutils.ExeExtension )
View Source
const CfgUpdateTag = "update_tag"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailableUpdate ¶
type AvailableUpdate struct { Channel string `json:"channel"` Version string `json:"version"` Platform string `json:"platform"` Path string `json:"path"` Sha256 string `json:"sha256"` Tag *string `json:"tag,omitempty"` }
func NewAvailableUpdate ¶
func NewAvailableUpdate(channel, version, platform, path, sha256, tag string) *AvailableUpdate
func NewAvailableUpdateFromGraph ¶
func NewAvailableUpdateFromGraph(au *graph.AvailableUpdate) *AvailableUpdate
func (*AvailableUpdate) Equals ¶
func (u *AvailableUpdate) Equals(origin *Origin) bool
func (*AvailableUpdate) IsValid ¶
func (u *AvailableUpdate) IsValid() bool
type Checker ¶
type Checker struct { InvocationSource InvocationSource // contains filtered or unexported fields }
func NewChecker ¶
func NewChecker(cfg Configurable, an analytics.Dispatcher, infoURL string, httpget *retryhttp.Client) *Checker
func NewDefaultChecker ¶
func NewDefaultChecker(cfg Configurable, an analytics.Dispatcher) *Checker
type Configurable ¶
type ErrorInProgress ¶
type ErrorInProgress struct{ *locale.LocalizedError }
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
func NewFetcher ¶
func NewFetcher(an analytics.Dispatcher) *Fetcher
type InvocationSource ¶
type InvocationSource string
var ( InvocationSourceInstall InvocationSource = "install" InvocationSourceUpdate InvocationSource = "update" )
type Origin ¶
func NewOriginDefault ¶
func NewOriginDefault() *Origin
type UpdateInstaller ¶
type UpdateInstaller struct { AvailableUpdate *AvailableUpdate Origin *Origin // contains filtered or unexported fields }
func NewUpdateInstaller ¶
func NewUpdateInstaller(an analytics.Dispatcher, avUpdate *AvailableUpdate) *UpdateInstaller
func NewUpdateInstallerByOrigin ¶
func NewUpdateInstallerByOrigin(an analytics.Dispatcher, origin *Origin, avUpdate *AvailableUpdate) *UpdateInstaller
NewUpdateInstallerByOrigin returns an instance of Update. Allowing origin to be set is useful for testing.
func (*UpdateInstaller) DownloadAndUnpack ¶
func (u *UpdateInstaller) DownloadAndUnpack() (string, error)
func (*UpdateInstaller) InstallBlocking ¶
func (u *UpdateInstaller) InstallBlocking(installTargetPath string, args ...string) (rerr error)
func (*UpdateInstaller) InstallWithProgress ¶
func (u *UpdateInstaller) InstallWithProgress(installTargetPath string, progressCb func(string, bool)) (*os.Process, error)
InstallWithProgress will fetch the update and run its installer Leave installTargetPath empty to use the default/existing installation path
func (*UpdateInstaller) ShouldInstall ¶
func (u *UpdateInstaller) ShouldInstall() bool
Click to show internal directories.
Click to hide internal directories.