pipeline

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	StateNotRun  = State("NotRun")
	StateRunning = State("Running")
	StateDone    = State("Done")
	StateFail    = State("Fail")
)

Variables

View Source
var (
	NotRunInstance  = &NotRunStep{}
	RunningInstance = &RunningStep{}
	DoneInstance    = &DoneStep{}
	FailInstance    = &FailStep{}
)

Functions

func GetJob

func GetJob(path string) (*model.Job, error)

GetJob 根据文件获取job信息

func GetJobFromReader

func GetJobFromReader(reader io.Reader) (*model.Job, error)

GetJobFromReader 根据流获取Job 信息

func GetJobFromYaml

func GetJobFromYaml(yamlStr string) (*model.Job, error)

Types

type DoneStep

type DoneStep struct {
}

DoneStep 完成状态

type FailStep

type FailStep struct {
}

FailStep 失败状态

type IStepState

type IStepState interface {
	// contains filtered or unexported methods
}

type NotRunStep

type NotRunStep struct {
}

NotRunStep 未开始状态

type RunningStep

type RunningStep struct {
}

RunningStep 运行中状态

func NewRunningStep

func NewRunningStep() *RunningStep

type State

type State string

type StepMachine

type StepMachine struct {
	// contains filtered or unexported fields
}

func InitialStepStateMachine

func InitialStepStateMachine() *StepMachine

func (*StepMachine) Run

func (s *StepMachine) Run()

func (*StepMachine) State

func (s *StepMachine) State() State

Jump to

Keyboard shortcuts

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