scheduler

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// Handle is a function to be called by scheduler
	Handle(object types.NamespacedName) error
}

Handler is an interface that scheduler can call

type Handlers

type Handlers map[v1.RegistryJobType]Handler

Handlers is a map of handler

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

Scheduler watches RegistryJobs and calls the job handlers, considering how many runs are running (in a jobPool)

func New

func New(c client.Client, s *runtime.Scheme) *Scheduler

New is a constructor for a Scheduler

func (Scheduler) Notify

func (s Scheduler) Notify(job *v1.RegistryJob)

Notify notifies scheduler to sync

func (*Scheduler) RegisterHandler

func (s *Scheduler) RegisterHandler(newType v1.RegistryJobType, handler Handler) error

RegisterHandler registers a handler which the scheduler can call

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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