Documentation ¶
Index ¶
- Constants
- func GetLocation() (*time.Location, error)
- func GetRequirementForCompletedWorkflowOrFatal(completed bool) *labels.Requirement
- func GetRequirementForMinIndexOrFatal(minIndex int64) *labels.Requirement
- func GetRequirementForScheduleNameOrFatal(swf string) *labels.Requirement
- type CronSchedule
- type PeriodicSchedule
- type ScheduledWorkflow
- func (s *ScheduledWorkflow) Get() *swfapi.ScheduledWorkflow
- func (s *ScheduledWorkflow) GetNextScheduledEpoch(activeWorkflowCount int64, nowEpoch int64, location time.Location) (nextScheduleEpoch int64, shouldRunNow bool)
- func (s *ScheduledWorkflow) MinIndex() int64
- func (s *ScheduledWorkflow) NewWorkflow(nextScheduledEpoch int64, nowEpoch int64) (*commonutil.Workflow, error)
- func (s *ScheduledWorkflow) NextResourceName() string
- func (s *ScheduledWorkflow) UpdateStatus(updatedEpoch int64, workflow *commonutil.Workflow, scheduledEpoch int64, ...)
Constants ¶
const ( ControllerAgentName string = "scheduled-workflow-controller" // ControllerAgentName is the name of the controller. TimeZone string = "CRON_SCHEDULE_TIMEZONE" // TimeZone is the name of the cron schedule timezone env parameter )
Variables ¶
This section is empty.
Functions ¶
func GetLocation ¶
func GetRequirementForCompletedWorkflowOrFatal ¶
func GetRequirementForCompletedWorkflowOrFatal(completed bool) *labels.Requirement
GetRequirementForCompletedWorkflowOrFatal returns a label requirement indicating whether a workflow is completed.
func GetRequirementForMinIndexOrFatal ¶
func GetRequirementForMinIndexOrFatal(minIndex int64) *labels.Requirement
GetRequirementForScheduleNameOrFatal returns a label requirement for a minimum index of creation of a workflow (to avoid querying the whole list).
func GetRequirementForScheduleNameOrFatal ¶
func GetRequirementForScheduleNameOrFatal(swf string) *labels.Requirement
GetRequirementForScheduleNameOrFatal returns a label requirement for a specific ScheduledWorkflow name.
Types ¶
type CronSchedule ¶
type CronSchedule struct {
*swfapi.CronSchedule
}
CronSchedule is a type to help manipulate CronSchedule objects.
func NewCronSchedule ¶
func NewCronSchedule(cronSchedule *swfapi.CronSchedule) *CronSchedule
NewCronSchedule creates a CronSchedule.
type PeriodicSchedule ¶
type PeriodicSchedule struct {
*swfapi.PeriodicSchedule
}
PeriodicSchedule is a type to help manipulate PeriodicSchedule objects.
func NewPeriodicSchedule ¶
func NewPeriodicSchedule(periodicSchedule *swfapi.PeriodicSchedule) *PeriodicSchedule
NewPeriodicSchedule creates a new PeriodicSchedule.
func (*PeriodicSchedule) GetNextScheduledEpoch ¶
func (s *PeriodicSchedule) GetNextScheduledEpoch(lastJobEpoch *int64, defaultStartEpoch int64) int64
GetNextScheduledEpoch returns the next epoch at which a workflow should be scheduled.
func (*PeriodicSchedule) GetNextScheduledEpochNoCatchup ¶
func (s *PeriodicSchedule) GetNextScheduledEpochNoCatchup( lastJobEpoch *int64, defaultStartEpoch int64, nowEpoch int64) int64
type ScheduledWorkflow ¶
type ScheduledWorkflow struct { *swfapi.ScheduledWorkflow // contains filtered or unexported fields }
ScheduledWorkflow is a type to help manipulate ScheduledWorkflow objects.
func NewScheduledWorkflow ¶
func NewScheduledWorkflow(swf *swfapi.ScheduledWorkflow) *ScheduledWorkflow
NewScheduledWorkflow creates an instance of ScheduledWorkflow.
func (*ScheduledWorkflow) Get ¶
func (s *ScheduledWorkflow) Get() *swfapi.ScheduledWorkflow
Get converts this object to a swfapi.ScheduledWorkflow.
func (*ScheduledWorkflow) GetNextScheduledEpoch ¶
func (s *ScheduledWorkflow) GetNextScheduledEpoch(activeWorkflowCount int64, nowEpoch int64, location time.Location) ( nextScheduleEpoch int64, shouldRunNow bool)
GetNextScheduledEpoch returns the next epoch at which a workflow should be scheduled, and whether it should be run now.
func (*ScheduledWorkflow) MinIndex ¶
func (s *ScheduledWorkflow) MinIndex() int64
MinIndex returns the minimum index of the workflow to retrieve as part of the workflow history.
func (*ScheduledWorkflow) NewWorkflow ¶
func (s *ScheduledWorkflow) NewWorkflow( nextScheduledEpoch int64, nowEpoch int64) (*commonutil.Workflow, error)
NewWorkflow creates a workflow for this schedule. It also sets the appropriate OwnerReferences on the resource so handleObject can discover the Schedule resource that 'owns' it.
func (*ScheduledWorkflow) NextResourceName ¶
func (s *ScheduledWorkflow) NextResourceName() string
NextResourceName creates a deterministic resource name for the next resource.
func (*ScheduledWorkflow) UpdateStatus ¶
func (s *ScheduledWorkflow) UpdateStatus(updatedEpoch int64, workflow *commonutil.Workflow, scheduledEpoch int64, active []swfapi.WorkflowStatus, completed []swfapi.WorkflowStatus, location *time.Location)
UpdateStatus updates the status of a workflow in the Kubernetes API server.