Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Factory = map[Kind]CreateFn{}
Functions ¶
func MustRegister ¶
MustRegister panic if register failed.
Types ¶
type ActionExecutor ¶
type ActionExecutor interface { Kind() Kind Name() Name // Exist 返回 created, started, error Exist(ctx context.Context, action *spec.PipelineTask) (created bool, started bool, err error) // Create 保证幂等 Create(ctx context.Context, action *spec.PipelineTask) (interface{}, error) // Start 保证幂等 Start(ctx context.Context, action *spec.PipelineTask) (interface{}, error) Update(ctx context.Context, action *spec.PipelineTask) (interface{}, error) // Status 只做简单重试 Status(ctx context.Context, action *spec.PipelineTask) (apistructs.PipelineStatusDesc, error) Inspect(ctx context.Context, action *spec.PipelineTask) (apistructs.TaskInspect, error) Cancel(ctx context.Context, action *spec.PipelineTask) (interface{}, error) Remove(ctx context.Context, action *spec.PipelineTask) (interface{}, error) BatchDelete(ctx context.Context, actions []*spec.PipelineTask) (interface{}, error) }
type CreateFn ¶
type CreateFn func(name Name, options map[string]string) (ActionExecutor, error)
Create be used to create an action executor instance.
Click to show internal directories.
Click to hide internal directories.