goupd

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 16 Imported by: 0

README

goupd

Internal auto-updater library that goes with the make-go project.

Documentation

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PROJECT_NAME string = "unconfigured"
	MODE         string = "DEV"
	GIT_TAG      string = ""
	DATE_TAG     string = "0"
	HOST         string = "https://dist-go.tristandev.net/"
)

Functions

func AutoUpdate

func AutoUpdate(allowTest bool)

func Busy added in v0.1.3

func Busy()

func BusyAdd added in v0.1.3

func BusyAdd(n uint64)

func BusyState added in v0.1.3

func BusyState() uint64

func BusySub added in v0.1.3

func BusySub(n uint64)

func Fetch added in v0.1.4

func Fetch(projectName, curTag, os, arch string, cb func(dateTag, gitTag string, r io.Reader) error) error

func GetUpdate added in v0.1.4

func GetUpdate(projectName, curTag, os, arch string) (string, string, string, error)

func RunAutoUpdateCheck

func RunAutoUpdateCheck() bool

RunAutoUpdateCheck will perform the update check, update the executable and return false if no update was performed. In case of update the program should restart and RunAutoUpdateCheck() should not return, but if it does, it'll return true.

func SetRestartCallback

func SetRestartCallback(cb func() error)

func SignalVersion

func SignalVersion(git, build string)

SignalVersion is called when seeing another peer running the same software to notify of its version. This will check if the peer is updated compared to us, and call RunAutoUpdateCheck() if necessary

func Unbusy added in v0.1.3

func Unbusy()

Types

This section is empty.

Jump to

Keyboard shortcuts

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