CMDCOrchestrator.Node.Registry (cmdc_orchestrator v0.5.0)

Copy Markdown View Source

编排节点 registry。

内置节点由本模块维护;企业应用可以通过配置追加自定义节点:

config :cmdc_orchestrator, :node_registry,
  custom_step: MyApp.Workflow.CustomStep

Summary

Functions

返回完整 registry,应用配置会覆盖同名内置项。

返回内置节点类型。

查找节点模块。

归一化节点类型。

执行节点 preflight。

Types

node_type()

@type node_type() :: atom() | String.t()

Functions

all()

@spec all() :: map()

返回完整 registry,应用配置会覆盖同名内置项。

builtin_types()

@spec builtin_types() :: [atom()]

返回内置节点类型。

execute(node, dep_results, context)

@spec execute(map(), map(), CMDCOrchestrator.Node.context()) ::
  {:ok, term()} | {:error, term()}

执行节点。

module_for(type)

@spec module_for(node_type()) :: {:ok, module()} | {:error, term()}

查找节点模块。

normalize_type(type)

@spec normalize_type(node_type()) :: {:ok, node_type()} | {:error, term()}

归一化节点类型。

preflight(node, context)

@spec preflight(map(), CMDCOrchestrator.Node.context()) :: :ok | {:error, term()}

执行节点 preflight。