workflowtrigger

package
v1.0.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KeyTemplate ...
	KeyTemplate = "%s/%s"
)

Variables

This section is empty.

Functions

func ToWorkflowTrigger

func ToWorkflowTrigger(obj interface{}) (*v1alpha1.WorkflowTrigger, error)

ToWorkflowTrigger converts to workflow trigger.

Types

type CronTrigger

type CronTrigger struct {
	Cron                *cron.Cron
	IsRunning           bool
	SuccCount           int
	FailCount           int
	Namespace           string
	WorkflowTriggerName string
	WorkflowRun         *v1alpha1.WorkflowRun
	Manage              *CronTriggerManager
}

CronTrigger ...

func (*CronTrigger) Run

func (t *CronTrigger) Run()

Run triggers the workflows.

type CronTriggerManager

type CronTriggerManager struct {
	Client         clientset.Interface
	CronTriggerMap map[string]*CronTrigger
	// contains filtered or unexported fields
}

CronTriggerManager represents manager for cron triggers.

func NewTriggerManager

func NewTriggerManager(client clientset.Interface) *CronTriggerManager

NewTriggerManager returns a cron trigger manager.

func (*CronTriggerManager) AddTrigger

func (m *CronTriggerManager) AddTrigger(trigger *CronTrigger)

AddTrigger adds one cron trigger.

func (*CronTriggerManager) CreateCron

func (m *CronTriggerManager) CreateCron(wft *v1alpha1.WorkflowTrigger)

CreateCron creates a cron trigger from workflow trigger, and add it to cron trigger manager.

func (*CronTriggerManager) DeleteCron

func (m *CronTriggerManager) DeleteCron(wft *v1alpha1.WorkflowTrigger)

DeleteCron deletes cron trigger from cron trigger manager.

func (*CronTriggerManager) DeleteTrigger

func (m *CronTriggerManager) DeleteTrigger(wftKey string)

DeleteTrigger deletes one cron trigger.

func (*CronTriggerManager) UpdateCron

func (m *CronTriggerManager) UpdateCron(wft *v1alpha1.WorkflowTrigger)

UpdateCron updates cron trigger based on workflow trigger.

type Handler

type Handler struct {
	CronManager *CronTriggerManager
}

Handler ...

func (*Handler) ObjectCreated

func (h *Handler) ObjectCreated(obj interface{})

ObjectCreated ...

func (*Handler) ObjectDeleted

func (h *Handler) ObjectDeleted(obj interface{})

ObjectDeleted ...

func (*Handler) ObjectUpdated

func (h *Handler) ObjectUpdated(obj interface{})

ObjectUpdated ...

Jump to

Keyboard shortcuts

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