Documentation ¶
Overview ¶
Package autoupdate provides Lantern with special tools to autoupdate itself with minimal effort.
Index ¶
Constants ¶
View Source
const PackagePublicKey = `` /* 450-byte string literal not displayed */
This is the public key of the BNS cert. Incoming updates will be signed to prevent MITM attacks.
Variables ¶
This section is empty.
Functions ¶
func ApplyNext ¶
ApplyNext applies the next available update whenever it is available, blocking until the next update has been applied. If ApplyNext returns without an error, that means that the current program's executable has been udpated in place and you may want to restart. If ApplyNext returns an error, that means that an unrecoverable error has occurred and we can't continue checking for updates.
func CheckMobileUpdate ¶
CheckMobileUpdate checks if a new update is available for mobile.
Types ¶
type Config ¶
type Config struct { // CurrentVersion: the current version of the program, must be in the form // X.Y.Z CurrentVersion string // URL: the url at which to check for updates URL string // PublicKey: the public key against which to check the signature of any // received updates. PublicKey []byte // CheckInterval: the interval at which to check for updates, defaults to // 4 hours. CheckInterval time.Duration // HTTPClient: (optional), an http.Client to use when checking for updates HTTPClient *http.Client // Operating system (optional, will be inferred) OS string // Arch (optional, will be inferred) Arch string // Channel (optional, defaults to stable) Channel string // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.