helpers

package
v0.0.0-...-1a1f412 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidOmahaResponse error indicates that the omaha response received
	// from CR was invalid.
	ErrInvalidOmahaResponse = errors.New("invalid omaha response")

	// ErrNoUpdate error indicates that there wasn't any update available for
	// instance requesting it in the context of the appID/groupID provided.
	ErrNoUpdate = errors.New("no update available")
)

Functions

func EventDownloadFinished

func EventDownloadFinished(instanceID, appID, groupID string) error

EventDownloadFinished posts an event to CR to indicate that the download of the update has finished.

func EventDownloadStarted

func EventDownloadStarted(instanceID, appID, groupID string) error

EventDownloadStarted posts an event to CR to indicate that the download of the update has started.

func EventUpdateFailed

func EventUpdateFailed(instanceID, appID, groupID string) error

EventUpdateFailed posts an event to CR to indicate that the update process complete but it didn't succeed.

func EventUpdateSucceeded

func EventUpdateSucceeded(instanceID, appID, groupID string) error

EventUpdateSucceeded posts an event to CR to indicate that the update was installed successfully and the new version is working fine.

Types

type Update

type Update struct {
	Version  string
	URL      string
	Filename string
	Hash     string
}

Update represents some information about an update received from CR.

func GetUpdate

func GetUpdate(instanceID, appID, groupID, version string) (*Update, error)

GetUpdate asks CR for an update for the given instance in the context of the application and group provided.

Jump to

Keyboard shortcuts

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