toolsversionchecker

package
v0.0.0-...-0a82276 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

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(ctx context.Context) error {
		return w.doCheck(ctx)
	}
	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(ctx context.Context) 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