updates

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ModuleName is the name of the update module
	// and can be used when declaring module dependencies.
	ModuleName = "updates"

	// VersionUpdateEvent is emitted every time a new
	// version of a monitored resource is selected.
	// During module initialization VersionUpdateEvent
	// is also emitted.
	VersionUpdateEvent = "active version update"

	// ResourceUpdateEvent is emitted every time the
	// updater successfully performed a resource update.
	// ResourceUpdateEvent is emitted even if no new
	// versions are available. Subscribers are expected
	// to check if new versions of their resources are
	// available by checking File.UpgradeAvailable().
	ResourceUpdateEvent = "resource update"

	// TriggerUpdateEvent is the event that can be emitted
	// by the updates module to trigger an update.
	TriggerUpdateEvent = "trigger update"
)

Variables

View Source
var (

	// MandatoryUpdates is a list of full identifiers that
	// should always be kept up to date.
	MandatoryUpdates []string

	// UserAgent is an HTTP User-Agent that is used to add
	// more context to requests made by the registry when
	// fetching resources from the update server.
	UserAgent = "Core"
)
View Source
var (
	// UpgradeCore specifies if portmaster-core should be upgraded.
	UpgradeCore = true
)

Functions

func CopyFile added in v0.4.4

func CopyFile(srcPath, dstPath string) (err error)

CopyFile atomically copies a file using the update registry's tmp dir.

func DisableUpdateSchedule added in v0.4.0

func DisableUpdateSchedule() error

DisableUpdateSchedule disables the update schedule. If called, updates are only checked when TriggerUpdate() is called.

func GetFile

func GetFile(identifier string) (*updater.File, error)

GetFile returns the latest generic file identified by the given identifier.

func GetPlatformFile

func GetPlatformFile(identifier string) (*updater.File, error)

GetPlatformFile returns the latest platform specific file identified by the given identifier.

func TriggerUpdate added in v0.4.0

func TriggerUpdate() error

TriggerUpdate queues the update task to execute ASAP.

Types

This section is empty.

Jump to

Keyboard shortcuts

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