2024-01-01 17:49:27 +08:00
|
|
|
|
package kis
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
2024-01-03 17:22:35 +08:00
|
|
|
|
"kis-flow/common"
|
2024-01-01 17:49:27 +08:00
|
|
|
|
"kis-flow/config"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Flow interface {
|
|
|
|
|
// Run 调度Flow,依次调度Flow中的Function并且执行
|
|
|
|
|
Run(ctx context.Context) error
|
|
|
|
|
// Link 将Flow中的Function按照配置文件中的配置进行连接
|
|
|
|
|
Link(fConf *config.KisFuncConfig, fParams config.FParam) error
|
2024-01-03 17:22:35 +08:00
|
|
|
|
// CommitRow 提交Flow数据到即将执行的Function层
|
|
|
|
|
CommitRow(row interface{}) error
|
|
|
|
|
// Input 得到flow当前执行Function的输入源数据
|
|
|
|
|
Input() common.KisRowArr
|
2024-01-04 16:36:36 +08:00
|
|
|
|
// GetName 得到Flow的名称
|
|
|
|
|
GetName() string
|
|
|
|
|
// GetThisFunction 得到当前正在执行的Function
|
|
|
|
|
GetThisFunction() Function
|
|
|
|
|
// GetThisFuncConf 得到当前正在执行的Function的配置
|
|
|
|
|
GetThisFuncConf() *config.KisFuncConfig
|
2024-01-01 17:49:27 +08:00
|
|
|
|
}
|