common

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 如果有增加新的系统变量,记得需要同步更新 SysParamNameList
	SysParamNamePFRunID    = "PF_RUN_ID"
	SysParamNamePFFsID     = "PF_FS_ID"
	SysParamNamePFJobID    = "PF_JOB_ID"
	SysParamNamePFStepName = "PF_STEP_NAME"
	SysParamNamePFFsName   = "PF_FS_NAME"
	SysParamNamePFUserID   = "PF_USER_ID"
	SysParamNamePFUserName = "PF_USER_NAME"
	SysParamNamePFRuntime  = "PF_RUN_TIME"

	WfExtraInfoKeySource   = "Source" // pipelineID or yamlPath
	WfExtraInfoKeyUserName = "UserName"
	WfExtraInfoKeyFsName   = "FsName"
	WfExtraInfoKeyFsID     = "FsID"

	ParamTypeString = "string"
	ParamTypeFloat  = "float"
	ParamTypePath   = "path"
	ParamTypeInt    = "int"

	WfParallelismDefault = 10
	WfParallelismMaximum = 20

	FieldParameters      = "parameters"
	FieldCommand         = "command"
	FieldEnv             = "env"
	FieldInputArtifacts  = "inputArtifacts"
	FieldOutputArtifacts = "outputArtifacts"

	CacheStrategyConservative = "conservative"
	CacheStrategyAggressive   = "aggressive"
	CacheExpiredTimeNever     = "-1"

	NodeTypeEntrypoint  NodeType = "entrypoints"
	NodeTypePostProcess NodeType = "postProcess"

	ViewTypeEntrypoint  ViewType = "entrypoints"
	ViewTypePostProcess ViewType = "postProcess"

	RegExpUpstreamTpl          = `^\{\{(\s)*[a-zA-Z0-9-]+\.[a-zA-Z0-9_]+(\s)*\}\}$`   // {{xx-xx.xx_xx}}
	RegExpIncludingUpstreamTpl = `\{\{(\s)*[a-zA-Z0-9-]+\.[a-zA-Z0-9_]+(\s)*\}\}`     // 包含 {{xx-xx.xx_xx}}
	RegExpIncludingTpl         = `\{\{(\s)*([a-zA-Z0-9-]*\.?[a-zA-Z0-9_]+)?(\s)*\}\}` // 包含 {{xx-xx.xx_xx}} 或 {{xx_xx}}

)

Variables

Functions

func DeleteSystemParamEnv

func DeleteSystemParamEnv(sysParamEnv map[string]string) map[string]string

删除系统变量

Types

type NodeType

type NodeType string

type PFRuntimeGenerator

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

func NewPFRuntimeGenerator

func NewPFRuntimeGenerator(runtimeView schema.RuntimeView, workflowSource schema.WorkflowSource) *PFRuntimeGenerator

func (*PFRuntimeGenerator) GetPFRuntime

func (pfg *PFRuntimeGenerator) GetPFRuntime(stepName string) (string, error)

1. 对于 entry_points 中的节点, 其 PF_RUN_TIME 只包含其祖先节点的信息 2. 对于 post_process 中的节点,其 PF_RUN_TIME 包含entrypoint中所有节点的信息 3. 由于所有节点的系统的变量都是一支的,所以 PF_RUN_TIME 中的节点信息中不包含系统环境变量

type VariableChecker

type VariableChecker struct {
}

func (*VariableChecker) CheckRefUpstreamStep

func (variableChecker *VariableChecker) CheckRefUpstreamStep(varValue string) error

func (*VariableChecker) CheckStepName

func (VariableChecker *VariableChecker) CheckStepName(stepName string) error

func (*VariableChecker) CheckVarName

func (variableChecker *VariableChecker) CheckVarName(varName string) error

type ViewType

type ViewType string

Jump to

Keyboard shortcuts

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