task

package
v0.3.37 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type INPUT_TYPE

type INPUT_TYPE protocol.Enum
const (
	FROM_CONTEXT      INPUT_TYPE = iota //从环境变量
	FROM_PARENT_INPUT                   //从父任务的Input
	FROM_PREV                           //从上一个任务
	FROM_SIBLING                        //从同级任务
)

type InputConfig added in v0.1.28

type InputConfig struct {
	Inputs []InputParam
}

type InputParam added in v0.1.28

type InputParam struct {
	Type     INPUT_TYPE
	Name     string
	Optional bool
}

type PipeLine

type PipeLine struct {
	Order        TASK_ORDER
	FailedByPass bool
	// contains filtered or unexported fields
}

任务基础类

func (*PipeLine) Add

func (this *PipeLine) Add(flow lokas.ITaskPipeLine) lokas.ITaskPipeLine

func (*PipeLine) Execute

func (this *PipeLine) Execute() *promise.Promise

func (*PipeLine) GetChildById

func (this *PipeLine) GetChildById(idx int) lokas.ITaskPipeLine

func (*PipeLine) GetChildByName

func (this *PipeLine) GetChildByName(s string) lokas.ITaskPipeLine

func (*PipeLine) GetChildren

func (this *PipeLine) GetChildren() []lokas.ITaskPipeLine

func (*PipeLine) GetContext

func (this *PipeLine) GetContext() lokas.IContext

func (*PipeLine) GetInput

func (this *PipeLine) GetInput() lokas.IContext

func (*PipeLine) GetNext

func (this *PipeLine) GetNext() lokas.ITaskPipeLine

func (*PipeLine) GetParent

func (this *PipeLine) GetParent() lokas.ITaskPipeLine

func (*PipeLine) GetPrev

func (this *PipeLine) GetPrev() lokas.ITaskPipeLine

func (*PipeLine) GetSibling

func (this *PipeLine) GetSibling(idx int) lokas.ITaskPipeLine

func (*PipeLine) Idx

func (this *PipeLine) Idx() int

func (*PipeLine) Insert

func (this *PipeLine) Insert(flow lokas.ITaskPipeLine, idx int) lokas.ITaskPipeLine

func (*PipeLine) Name

func (this *PipeLine) Name() string

func (*PipeLine) Remove

func (this *PipeLine) Remove(flow lokas.ITaskPipeLine) lokas.ITaskPipeLine

func (*PipeLine) RemoveAt

func (this *PipeLine) RemoveAt(idx int) lokas.ITaskPipeLine

func (*PipeLine) SetContext

func (this *PipeLine) SetContext(context lokas.IContext)

func (*PipeLine) SetExecFunc

func (this *PipeLine) SetExecFunc(f func() (IContext error, err error))

func (*PipeLine) SetIdx

func (this *PipeLine) SetIdx(i int)

func (*PipeLine) SetInput

func (this *PipeLine) SetInput(context lokas.IContext)

func (*PipeLine) SetName

func (this *PipeLine) SetName(s string)

type TASK_ORDER

type TASK_ORDER protocol.Enum
const (
	PARALLEL  TASK_ORDER = iota //并行
	WATERFALL                   //串行
)

Jump to

Keyboard shortcuts

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