Documentation ¶
Index ¶
- func GetClientSet(config *rest.Config) *kubernetes.Clientset
- func GetConfig(pathToKubeconfig string) (*rest.Config, error)
- func GetDiscoveryClient(config *rest.Config) *discovery.DiscoveryClient
- type CronJobCollection
- func (coll *CronJobCollection) AddCronJob(cronjob *v1.CronJob)
- func (coll CronJobCollection) CompareServerVersion(major int, minor int) (int, error)
- func (coll CronJobCollection) GetAllWatchedCronJobUIDs() []types.UID
- func (coll CronJobCollection) GetPreferredBatchApiVersion() (string, error)
- func (coll *CronJobCollection) LoadAllExistingCronJobs() error
- func (coll *CronJobCollection) RemoveCronJob(cronjob *v1.CronJob)
- func (coll CronJobCollection) StartWatchingAll()
- func (coll CronJobCollection) StopWatchingAll()
- type CronJobWatcher
- type EventHandler
- func (e EventHandler) CheckJobIsWatched(jobNamespace string, jobName string) bool
- func (e EventHandler) CheckPodFilter(podName string) bool
- func (e EventHandler) FetchObjectsFromJobEvent(event *pkg.JobEvent) (pod *corev1.Pod, logs string, job *v1.Job, cronjob *v1.CronJob, err error)
- func (e EventHandler) FetchObjectsFromPodEvent(event *pkg.PodEvent) (pod *corev1.Pod, logs string, job *v1.Job, cronjob *v1.CronJob, err error)
- func (e EventHandler) OnAdd(obj interface{})
- type JobNotFoundError
- type PodNotFoundError
- type WatchWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientSet ¶
func GetClientSet(config *rest.Config) *kubernetes.Clientset
func GetDiscoveryClient ¶
func GetDiscoveryClient(config *rest.Config) *discovery.DiscoveryClient
Types ¶
type CronJobCollection ¶
type CronJobCollection struct {
// contains filtered or unexported fields
}
func NewCronJobCollection ¶
func NewCronJobCollection(pathToKubeconfig string, namespace string, cronitorApi *api.CronitorApi) (*CronJobCollection, error)
func (*CronJobCollection) AddCronJob ¶
func (coll *CronJobCollection) AddCronJob(cronjob *v1.CronJob)
func (CronJobCollection) CompareServerVersion ¶
func (coll CronJobCollection) CompareServerVersion(major int, minor int) (int, error)
CompareServerVersion will return 1 if the server version is higher than the compared version, -1 if it is lower than the compared version, or 0 if they are the same
func (CronJobCollection) GetAllWatchedCronJobUIDs ¶
func (coll CronJobCollection) GetAllWatchedCronJobUIDs() []types.UID
func (CronJobCollection) GetPreferredBatchApiVersion ¶
func (coll CronJobCollection) GetPreferredBatchApiVersion() (string, error)
func (*CronJobCollection) LoadAllExistingCronJobs ¶
func (coll *CronJobCollection) LoadAllExistingCronJobs() error
func (*CronJobCollection) RemoveCronJob ¶
func (coll *CronJobCollection) RemoveCronJob(cronjob *v1.CronJob)
func (CronJobCollection) StartWatchingAll ¶
func (coll CronJobCollection) StartWatchingAll()
func (CronJobCollection) StopWatchingAll ¶
func (coll CronJobCollection) StopWatchingAll()
type CronJobWatcher ¶
type CronJobWatcher struct {
// contains filtered or unexported fields
}
func NewCronJobWatcher ¶
func NewCronJobWatcher(coll CronJobCollection) CronJobWatcher
func (CronJobWatcher) StartWatching ¶
func (c CronJobWatcher) StartWatching()
func (CronJobWatcher) StopWatching ¶
func (c CronJobWatcher) StopWatching()
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func (EventHandler) CheckJobIsWatched ¶
func (e EventHandler) CheckJobIsWatched(jobNamespace string, jobName string) bool
func (EventHandler) CheckPodFilter ¶
func (e EventHandler) CheckPodFilter(podName string) bool
func (EventHandler) FetchObjectsFromJobEvent ¶
func (EventHandler) FetchObjectsFromPodEvent ¶
func (EventHandler) OnAdd ¶
func (e EventHandler) OnAdd(obj interface{})
type JobNotFoundError ¶
type JobNotFoundError struct { Err error // contains filtered or unexported fields }
func (JobNotFoundError) Error ¶
func (e JobNotFoundError) Error() string
func (JobNotFoundError) Unwrap ¶
func (e JobNotFoundError) Unwrap() error
type PodNotFoundError ¶
type PodNotFoundError struct { Err error // contains filtered or unexported fields }
func (PodNotFoundError) Error ¶
func (e PodNotFoundError) Error() string
func (PodNotFoundError) Unwrap ¶
func (e PodNotFoundError) Unwrap() error
type WatchWrapper ¶
type WatchWrapper struct {
// contains filtered or unexported fields
}
func NewJobsEventWatcher ¶
func NewJobsEventWatcher(collection *CronJobCollection) *WatchWrapper
func (WatchWrapper) Start ¶
func (w WatchWrapper) Start()
func (WatchWrapper) Stop ¶
func (w WatchWrapper) Stop()
Click to show internal directories.
Click to hide internal directories.