updater

package
v1.0.9-0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2016 License: BSD-3-Clause, BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	GetUpdatePreferenceAuto() bool
	GetUpdatePreferenceSnoozeUntil() keybase1.Time
	GetUpdatePreferenceSkip() string
	GetUpdateLastChecked() keybase1.Time
	SetUpdatePreferenceAuto(b bool) error
	SetUpdatePreferenceSkip(v string) error
	SetUpdatePreferenceSnoozeUntil(t keybase1.Time) error
	SetUpdateLastChecked(t keybase1.Time) error
}

type Group

type Group struct {
	// contains filtered or unexported fields
}

Group represents a class of work and forms a namespace in which units of work can be executed with duplicate suppression.

func (*Group) Do

func (g *Group) Do(key string, fn func() (interface{}, error)) (interface{}, bool, error)

Do executes and returns the results of the given function, making sure that only one execution is in-flight for a given key at a time. If a duplicate comes in, the duplicate caller waits for the original to complete and receives the same results.

type UI

type UI interface {
	GetUpdateUI() (libkb.UpdateUI, error)
}

type UpdateChecker

type UpdateChecker struct {
	// contains filtered or unexported fields
}

func NewUpdateChecker

func NewUpdateChecker(updater *Updater, ui UI, log logger.Logger) UpdateChecker

func (*UpdateChecker) Check

func (u *UpdateChecker) Check(force bool, requested bool) error

Check checks for an update. If not requested (by user) or forced it will exit early if check has already been applied within checkDuration().

func (*UpdateChecker) Start

func (u *UpdateChecker) Start()

func (*UpdateChecker) Stop

func (u *UpdateChecker) Stop()

type Updater

type Updater struct {
	// contains filtered or unexported fields
}

func NewUpdater

func NewUpdater(options keybase1.UpdateOptions, source sources.UpdateSource, config Config, log logger.Logger) *Updater

func (*Updater) Options

func (u *Updater) Options() keybase1.UpdateOptions

func (*Updater) Update

func (u *Updater) Update(ui UI, force bool, requested bool) (*keybase1.Update, error)

Update checks, downloads and performs an update.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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