Documentation ¶
Index ¶
- Constants
- Variables
- func CheckDictParam(dict DictParam, paramName string, realVal interface{}) (interface{}, error)
- func CheckListParam(param []interface{}) error
- func DeleteSystemParamEnv(sysParamEnv map[string]string) map[string]string
- func GetArtifactContent(artPath string, maxSize int, fsID string, logger *logrus.Entry) (string, error)
- func GetArtifactMountPath(mainFS *schema.FsMount, artifactPath string) string
- func GetFSMountPath(FS *schema.FsMount) string
- func GetInputArtifactEnvName(atfName string) string
- func GetOutputArtifactEnvName(atfName string) string
- func GetRandID(randNum int) string
- func GetSiblingAbsoluteName(curAbsName string, siblingRelativeName string) string
- func InvalidParamTypeError(param interface{}, expected string) error
- func LatestTime(times []time.Time) time.Time
- func MismatchRegexError(param, regex string) error
- func ParseParamName(paramName string) []string
- func StringsContain(items []string, item string) bool
- func TopologicalSort(components map[string]schema.Component) ([]string, error)
- func UnsupportedDictParamTypeError(unsupportedType string, paramName string, param interface{}) error
- func UnsupportedParamTypeError(param interface{}, paramName string) error
- func UnsupportedPathParamError(param interface{}, paramName string) error
- type ComponentParamChecker
- type DictParam
- type NodeType
- type ResourceHandler
- type VariableChecker
- func (VariableChecker *VariableChecker) CheckCompName(compName string) error
- func (variableChecker *VariableChecker) CheckRefArgument(varValue string) error
- func (variableChecker *VariableChecker) CheckRefUpstreamStep(varValue string) error
- func (variableChecker *VariableChecker) CheckRunAndPPLName(varName string) error
- func (variableChecker *VariableChecker) CheckVarName(varName string) error
- type ViewType
Constants ¶
View Source
const ( // 如果有增加新的系统变量,记得需要同步更新 SysParamNameList SysParamNamePFRunID = "PF_RUN_ID" SysParamNamePFStepName = "PF_STEP_NAME" SysParamNamePFUserName = "PF_USER_NAME" SysParamNamePFLoopArgument = "PF_LOOP_ARGUMENT" PF_PARENT = "PF_PARENT" PF_LOOP_ARGUMENT = "PF_LOOP_ARGUMENT" WfExtraInfoKeySource = "Source" // pipelineID or yamlPath WfExtraInfoKeyFSUserName = "FsUserName" WfExtraInfoKeyFsName = "FsName" WfExtraInfoKeyFsID = "FsID" ParamTypeString = "string" ParamTypeFloat = "float" ParamTypePath = "path" ParamTypeInt = "int" ParamTypeList = "list" WfParallelismDefault = 10 WfParallelismMaximum = 20 FieldParameters = "parameters" FieldCommand = "command" FieldEnv = "env" FieldInputArtifacts = "inputArtifacts" FieldOutputArtifacts = "outputArtifacts" FieldCondition = "condition" FieldLoopArguemt = "loop_argument" 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}} RegExpCurTpl = `^\{\{(\s)*([a-zA-Z0-9_]+)(\s)*\}\}$` // {{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} RegExpIncludingCurTpl = `\{\{(\s)*([a-zA-Z0-9_]+)(\s)*\}\}` // 包含 {{xx_xx}} // condition 字段中引用的 artifact 支持最大空间, 单位为 byte ConditionArtifactMaxSize = 1024 // 1KB // loop_argument 字段中引用的 artifact 支持最大空间, 单位为 byte LoopArgumentArtifactMaxSize = 1024 * 1024 // 1MB // dagID 中随机码的位数 DagIDRandCodeNum = 16 // artifact 挂载路径的父目录 ArtMountDir = "/tmp" )
Variables ¶
View Source
var SysParamNameList []string = []string{ SysParamNamePFRunID, SysParamNamePFStepName, SysParamNamePFUserName, SysParamNamePFLoopArgument, }
Functions ¶
func CheckDictParam ¶ added in v0.14.3
func CheckListParam ¶ added in v0.14.4
func CheckListParam(param []interface{}) error
func DeleteSystemParamEnv ¶
删除系统变量
func GetArtifactContent ¶ added in v0.14.3
func GetArtifactContent(artPath string, maxSize int, fsID string, logger *logrus.Entry) (string, error)
获取制定Artifact的内容
func GetArtifactMountPath ¶ added in v0.14.3
func GetFSMountPath ¶ added in v0.14.3
func GetInputArtifactEnvName ¶ added in v0.14.3
func GetOutputArtifactEnvName ¶ added in v0.14.3
func GetSiblingAbsoluteName ¶ added in v0.14.3
func InvalidParamTypeError ¶ added in v0.14.3
func MismatchRegexError ¶ added in v0.14.3
func ParseParamName ¶ added in v0.14.3
func StringsContain ¶ added in v0.14.3
func TopologicalSort ¶ added in v0.14.3
func UnsupportedDictParamTypeError ¶ added in v0.14.3
func UnsupportedParamTypeError ¶ added in v0.14.3
func UnsupportedPathParamError ¶ added in v0.14.3
Types ¶
type ComponentParamChecker ¶ added in v0.14.3
type ComponentParamChecker struct { Components map[string]schema.Component // 需要传入相关的所有 step,以判断依赖是否合法 SysParams map[string]string // sysParams 的值和 step 相关,需要传入 DisabledSteps []string // 被disabled的节点列表 UseFs bool // 表示是否挂载Fs CompTempletes map[string]schema.Component // 对应WorkflowSource中的Components的内容 }
1.4.3后,Checker承担了Parameters的处理任务,如dict形式的param替换为实际值、请求的参数替换节点参数
type ResourceHandler ¶ added in v0.14.3
type ResourceHandler struct {
// contains filtered or unexported fields
}
* resourceHandler
func NewResourceHandler ¶ added in v0.14.3
func (*ResourceHandler) ClearResource ¶ added in v0.14.3
func (resourceHandler *ResourceHandler) ClearResource() error
func (*ResourceHandler) GenerateOutAtfPath ¶ added in v0.14.3
type VariableChecker ¶
type VariableChecker struct { }
func (*VariableChecker) CheckCompName ¶ added in v0.14.3
func (VariableChecker *VariableChecker) CheckCompName(compName string) error
func (*VariableChecker) CheckRefArgument ¶ added in v0.14.4
func (variableChecker *VariableChecker) CheckRefArgument(varValue string) error
检查是否使用了模板,如 {{xxx}} 或 {{xxx.xxx}}
func (*VariableChecker) CheckRefUpstreamStep ¶
func (variableChecker *VariableChecker) CheckRefUpstreamStep(varValue string) error
func (*VariableChecker) CheckRunAndPPLName ¶ added in v0.14.5
func (variableChecker *VariableChecker) CheckRunAndPPLName(varName string) error
func (*VariableChecker) CheckVarName ¶
func (variableChecker *VariableChecker) CheckVarName(varName string) error
Click to show internal directories.
Click to hide internal directories.