kis-flow/function/kis_function_l.go
2024-01-04 16:36:36 +08:00

24 lines
482 B
Go

package function
import (
"context"
"kis-flow/kis"
"kis-flow/log"
)
type KisFunctionL struct {
BaseFunction
}
func (f *KisFunctionL) Call(ctx context.Context, flow kis.Flow) error {
log.Logger().InfoF("KisFunctionL, flow = %+v\n", flow)
// 通过KisPool 路由到具体的执行计算Function中
if err := kis.Pool().CallFunction(ctx, f.Config.FName, flow); err != nil {
log.Logger().ErrorFX(ctx, "Function Called Error err = %s\n", err)
return err
}
return nil
}