jobs

package
v2.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoPeriodic

func DoPeriodic(pSlice []Periodic) chan<- struct{}

DoPeriodic calls p.Do() once, and then again every p.Frequency() on each element p in pSlice. For each p in pSlice, a new goroutine is started, and the returned channel can be closed to stop all of the goroutines.

Types

type Periodic

type Periodic interface {
	// Do begins the periodic job. It starts the first execution of the job, and then is
	// repsonsible for executing it every Frequency() thereafter
	Do() error
	Frequency() time.Duration
}

Periodic is an interface for managing periodic job invocation

func NewGetLatestVersionDataPeriodic

func NewGetLatestVersionDataPeriodic(
	installedData data.InstalledData,
	clusterID data.ClusterID,
	availVsn data.AvailableVersions,
	availCompVsn data.AvailableComponentVersion,
	frequency time.Duration,
) Periodic

NewGetLatestVersionDataPeriodic creates a new periodic implementation that gets latest version data. It uses sgc and rcl as the secret getter/creator and replication controller lister implementations (respectively)

func NewSendVersionsPeriodic

func NewSendVersionsPeriodic(
	apiClient *apiclient.WorkflowManager,
	clusterID data.ClusterID,
	ri *k8s.ResourceInterfaceNamespaced,
	availableVersions data.AvailableVersions,
	frequency time.Duration,
) Periodic

NewSendVersionsPeriodic creates a new SendVersions using sgc and rcl as the the secret getter / creator and replication controller lister implementations (respectively)

Jump to

Keyboard shortcuts

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