Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { ReconcileOnePipeline(ctx context.Context, pipelineID uint64) // InjectLegacyFields TODO decouple it InjectLegacyFields(f *PipelineSvcFuncs) }
type PipelineReconciler ¶
type PipelineReconciler interface { // IsReconcileDone check if reconciler is done. IsReconcileDone(ctx context.Context, p *spec.Pipeline) bool // NeedReconcile check whether this pipeline need reconcile. NeedReconcile(ctx context.Context, p *spec.Pipeline) bool // PrepareBeforeReconcile do something before reconcile. PrepareBeforeReconcile(ctx context.Context, p *spec.Pipeline) // GetTasksCanBeConcurrentlyScheduled get all tasks which can be concurrently scheduled. GetTasksCanBeConcurrentlyScheduled(ctx context.Context, p *spec.Pipeline) ([]*spec.PipelineTask, error) // ReconcileOneSchedulableTask reconcile the schedulable task belong to one pipeline. ReconcileOneSchedulableTask(ctx context.Context, p *spec.Pipeline, task *spec.PipelineTask) // UpdateCurrentReconcileStatusIfNecessary calculate current reconcile status and update if necessary. UpdateCurrentReconcileStatusIfNecessary(ctx context.Context, p *spec.Pipeline) error // TeardownAfterReconcileDone teardown one pipeline after reconcile done. TeardownAfterReconcileDone(ctx context.Context, p *spec.Pipeline) // CancelReconcile cancel reconcile the pipeline. CancelReconcile(ctx context.Context, p *spec.Pipeline) }
PipelineReconciler is reconciler for pipeline.
type PipelineSvcFuncs ¶
type PipelineSvcFuncs struct { CronNotExecuteCompensate func(id uint64) error MergePipelineYmlTasks func(pipelineYml *pipelineyml.PipelineYml, dbTasks []spec.PipelineTask, p *spec.Pipeline, dbStages []spec.PipelineStage, passedDataWhenCreate *action_info.PassedDataWhenCreate) (mergeTasks []spec.PipelineTask, err error) HandleQueryPipelineYamlBySnippetConfigs func(sourceSnippetConfigs []*pb.SnippetDetailQuery) (map[string]string, error) MakeSnippetPipeline4Create func(p *spec.Pipeline, snippetTask *spec.PipelineTask, yamlContent string) (*spec.Pipeline, error) CreatePipelineGraph func(p *spec.Pipeline) (stages []spec.PipelineStage, err error) PreCheck func(p *spec.Pipeline, stages []spec.PipelineStage, userID string, autoRun bool) error ConvertSnippetConfig2String func(snippetConfig *pb.SnippetDetailQuery) string }
type TaskReconciler ¶
type TaskReconciler interface { // ReconcileOneTaskUntilDone reconcile one task until done. // done means end status, include success, failed and others. ReconcileOneTaskUntilDone(ctx context.Context, p *spec.Pipeline, task *spec.PipelineTask) IdempotentSaveTask(ctx context.Context, p *spec.Pipeline, task *spec.PipelineTask) error NeedReconcile(ctx context.Context, p *spec.Pipeline, task *spec.PipelineTask) bool ReconcileSnippetTask(ctx context.Context, p *spec.Pipeline, task *spec.PipelineTask) error ReconcileNormalTask(ctx context.Context, p *spec.Pipeline, task *spec.PipelineTask) error TeardownAfterReconcileDone(ctx context.Context, p *spec.Pipeline, task *spec.PipelineTask) CreateSnippetPipeline(ctx context.Context, p *spec.Pipeline, task *spec.PipelineTask) (snippetPipeline *spec.Pipeline, err error) PrepareBeforeReconcileSnippetPipeline(ctx context.Context, snippetPipeline *spec.Pipeline, snippetTask *spec.PipelineTask) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.