kis-flow/test/faas/faas_demo3.go

22 lines
498 B
Go
Raw Normal View History

2024-01-09 17:30:58 +08:00
package faas
import (
"context"
"fmt"
2024-03-26 14:54:50 +08:00
"github.com/aceld/kis-flow/kis"
2024-01-09 17:30:58 +08:00
)
// type FaaS func(context.Context, Flow) error
func FuncDemo3Handler(ctx context.Context, flow kis.Flow) error {
fmt.Println("---> Call funcName3Handler ----")
2024-01-26 17:27:29 +08:00
fmt.Printf("Params = %+v\n", flow.GetFuncParamAll())
2024-01-09 17:30:58 +08:00
for _, row := range flow.Input() {
2024-04-15 17:50:02 +08:00
str := fmt.Sprintf("In FuncName = %s, FuncId = %s, row = %s", flow.GetThisFuncConf().FName, flow.GetThisFunction().GetID(), row)
2024-01-09 17:30:58 +08:00
fmt.Println(str)
}
return nil
}