kis-flow/test/caas/caas_demo1.go

21 lines
632 B
Go
Raw Normal View History

2024-01-09 17:30:58 +08:00
package caas
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
)
2024-04-03 20:26:52 +08:00
// type CaaS func(context.Context, Connector, Function, Flow, interface{}) (interface{}, error)
2024-01-09 17:30:58 +08:00
func CaasDemoHanler1(ctx context.Context, conn kis.Connector, fn kis.Function, flow kis.Flow, args interface{}) (interface{}, error) {
2024-01-09 17:30:58 +08:00
fmt.Printf("===> In CaasDemoHanler1: flowName: %s, cName:%s, fnName:%s, mode:%s\n",
flow.GetName(), conn.GetName(), fn.GetConfig().FName, fn.GetConfig().FMode)
2024-01-26 17:27:29 +08:00
fmt.Printf("Params = %+v\n", conn.GetConfig().Params)
2024-01-09 17:30:58 +08:00
fmt.Printf("===> Call Connector CaasDemoHanler1, args from funciton: %s\n", args)
return nil, nil
2024-01-09 17:30:58 +08:00
}