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)