autoupdate

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Updater

type Updater struct {
	UpdateInterval time.Duration
	SelfRestart    bool
	// contains filtered or unexported fields
}

Updater is a helper for autoupdating go-binaries with their builds on GoBuilder.me

func New

func New(repo, label string) *Updater

New instanciates a new Updater

func (*Updater) HasUpdate added in v1.35.0

func (g *Updater) HasUpdate() (bool, error)

HasUpdate checks whether a new version is available

func (*Updater) Run

func (g *Updater) Run() error

Run starts a permanent loop (better start as a go-routine) looking for updates to the current binary and will execute the update if required. This is intended for long running processes like daemons

func (*Updater) SingleRun added in v1.35.0

func (g *Updater) SingleRun() error

SingleRun checks for an update and updates the binary when required.

Jump to

Keyboard shortcuts

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