Documentation
¶
Overview ¶
Package validation 校验 workflow 定义是否满足 FlowLink 协议和执行器注册约束。
它只返回结构化校验错误,不负责 HTTP 响应、持久化或运行时执行。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsError ¶
func AsError(errs []*schema.ValidationError) error
AsError 将校验错误列表转换为 error;空列表返回 nil。
Types ¶
type WorkflowValidator ¶
type WorkflowValidator struct {
// contains filtered or unexported fields
}
WorkflowValidator 校验 workflow 协议、节点结构和 node 可用性。
func NewWorkflowValidator ¶
func NewWorkflowValidator(nodeRegistry *nodepkg.Registry, schemaValidator schema.Validator) *WorkflowValidator
NewWorkflowValidator 创建 workflow 校验器。
func (*WorkflowValidator) Validate ¶
func (v *WorkflowValidator) Validate(ctx context.Context, wf *core.Workflow) []*schema.ValidationError
Validate 返回 workflow 中所有可发现的结构化校验错误。
func (*WorkflowValidator) WithoutNodeAvailabilityCheck ¶
func (v *WorkflowValidator) WithoutNodeAvailabilityCheck() *WorkflowValidator
WithoutNodeAvailabilityCheck 返回只校验通用协议和已知 schema 的副本。 控制面保存业务 workflow 时使用它;真实节点可用性由目标 worker 校验。
Click to show internal directories.
Click to hide internal directories.