toolsversionchecker

package
v0.0.0-...-e653fdf Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var New = func(api Facade, params *VersionCheckerParams) worker.Worker {
	w := &toolsVersionWorker{
		api:    api,
		params: params,
	}

	f := func(stop <-chan struct{}) error {
		return w.doCheck()
	}
	return jworker.NewPeriodicWorker(f, params.CheckInterval, jworker.NewTimer)
}

New returns a worker that periodically wakes up to try to find out and record the latest version of the tools so the update possibility can be displayed to the users on status.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency manifold that runs a toolsversionchecker worker, using the api connection resource named in the supplied config.

Types

type Facade

type Facade interface {
	UpdateToolsVersion() error
}

type ManifoldConfig

type ManifoldConfig engine.AgentAPIManifoldConfig

ManifoldConfig defines the names of the manifolds on which a Manifold will depend.

type VersionCheckerParams

type VersionCheckerParams struct {
	CheckInterval time.Duration
}

VersionCheckerParams holds params for the version checker worker..

Jump to

Keyboard shortcuts

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