cronjob

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromCells

func FromCells(cells []dataselect.DataCell) []batch2.CronJob

func GetCronJobCompletedJobs added in v1.10.0

func GetCronJobCompletedJobs(client client.Interface, metricClient metricapi.MetricClient,
	dsQuery *dataselect.DataSelectQuery, namespace, name string) (*job.JobList, error)

GetCronJobJobs returns list of jobs owned by cron job.

func GetCronJobEvents

func GetCronJobEvents(client client.Interface, dsQuery *dataselect.DataSelectQuery, namespace, name string) (
	*common.EventList, error)

GetCronJobEvents gets events associated to cron job.

func GetCronJobJobs

func GetCronJobJobs(client client.Interface, metricClient metricapi.MetricClient,
	dsQuery *dataselect.DataSelectQuery, namespace, name string) (*job.JobList, error)

GetCronJobJobs returns list of jobs owned by cron job.

func ToCells

func ToCells(std []batch2.CronJob) []dataselect.DataCell

func TriggerCronJob added in v1.10.0

func TriggerCronJob(client client.Interface,
	namespace, name string) error

TriggerCronJob manually triggers a cron job and creates a new job.

Types

type CronJob

type CronJob struct {
	ObjectMeta   api.ObjectMeta `json:"objectMeta"`
	TypeMeta     api.TypeMeta   `json:"typeMeta"`
	Schedule     string         `json:"schedule"`
	Suspend      *bool          `json:"suspend"`
	Active       int            `json:"active"`
	LastSchedule *metav1.Time   `json:"lastSchedule"`
}

CronJob is a presentation layer view of Kubernetes Cron Job resource.

type CronJobCell

type CronJobCell batch2.CronJob

func (CronJobCell) GetProperty

func (CronJobCell) GetResourceSelector

func (self CronJobCell) GetResourceSelector() *metricapi.ResourceSelector

type CronJobDetail

type CronJobDetail struct {
	ConcurrencyPolicy       string           `json:"concurrencyPolicy"`
	StartingDeadLineSeconds *int64           `json:"startingDeadlineSeconds"`
	ActiveJobs              job.JobList      `json:"activeJobs"`
	InactiveJobs            job.JobList      `json:"inactiveJobs"`
	Events                  common.EventList `json:"events"`

	// Extends list item structure.
	CronJob `json:",inline"`

	// List of non-critical errors, that occurred during resource retrieval.
	Errors []error `json:"errors"`
}

CronJobDetail contains Cron Job details.

func GetCronJobDetail

func GetCronJobDetail(client k8sClient.Interface, dsQuery *dataselect.DataSelectQuery,
	metricClient metricapi.MetricClient, namespace, name string) (*CronJobDetail, error)

GetCronJobDetail gets Cron Job details.

type CronJobList

type CronJobList struct {
	ListMeta          api.ListMeta       `json:"listMeta"`
	CumulativeMetrics []metricapi.Metric `json:"cumulativeMetrics"`
	Items             []CronJob          `json:"items"`

	// Basic information about resources status on the list.
	Status common.ResourceStatus `json:"status"`

	// List of non-critical errors, that occurred during resource retrieval.
	Errors []error `json:"errors"`
}

CronJobList contains a list of CronJobs in the cluster.

func GetCronJobList

func GetCronJobList(client client.Interface, nsQuery *common.NamespaceQuery,
	dsQuery *dataselect.DataSelectQuery, metricClient metricapi.MetricClient) (*CronJobList, error)

GetCronJobList returns a list of all CronJobs in the cluster.

func GetCronJobListFromChannels

func GetCronJobListFromChannels(channels *common.ResourceChannels, dsQuery *dataselect.DataSelectQuery,
	metricClient metricapi.MetricClient) (*CronJobList, error)

GetCronJobListFromChannels returns a list of all CronJobs in the cluster reading required resource list once from the channels.

Jump to

Keyboard shortcuts

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