Merge pull request #23 from aceld/feature/aceld

Add Flow func:GetId()
This commit is contained in:
刘丹冰 2024-04-15 10:46:23 +08:00 committed by GitHub
commit 313a42ca3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 2 deletions

View File

@ -311,6 +311,10 @@ func (flow *KisFlow) GetName() string {
return flow.Name
}
func (flow *KisFlow) GetId() string {
return flow.Id
}
func (flow *KisFlow) GetThisFunction() kis.Function {
return flow.ThisFunction
}

View File

@ -53,4 +53,6 @@ type Flow interface {
GetFuncParamsAllFuncs() map[string]config.FParam
// Fork 得到Flow的一个副本(深拷贝)
Fork(ctx context.Context) Flow
// GetId 得到Flow的Id
GetId() string
}

View File

@ -6,7 +6,7 @@ import (
"github.com/aceld/kis-flow/kis"
)
// type CaaS func(context.Context, Connector, Function, Flow, interface{}) error
// type CaaS func(context.Context, Connector, Function, Flow, interface{}) (interface{}, error)
func CaasDemoHanler1(ctx context.Context, conn kis.Connector, fn kis.Function, flow kis.Flow, args interface{}) (interface{}, error) {
fmt.Printf("===> In CaasDemoHanler1: flowName: %s, cName:%s, fnName:%s, mode:%s\n",

View File

@ -14,7 +14,7 @@ func InitConnDemo1(connector kis.Connector) error {
fmt.Println(connConf)
// init connector , 如 初始化数据库链接等
// init connector
return nil
}