Documentation
¶
Index ¶
Constants ¶
View Source
const ( MODULE_HEALTHCHECK = "健康检查" MODULE_HANDLER = "执行节点" MODULE_DEBUG = "调试" )
Variables ¶
View Source
var Cfg = new(Config)
Cfg 全局配置(需要先执行MustLoad,否则拿不到配置)
Functions ¶
func GetGrpcContext ¶
Types ¶
type Config ¶
type Config struct {
Flow struct {
Name string `json:"name" yaml:"name"`
Mode TaskMode `json:"mode" yaml:"mode"`
Timeout uint `json:"timeout" yaml:"timeout"`
} `json:"flow" yaml:"flow"`
FlowEngine Grpc `json:"flowEngine" yaml:"flowEngine"`
Log logger.Config `json:"log" yaml:"log"`
Pprof struct {
Enable bool `json:"enable" yaml:"enable"`
Host string `json:"host" yaml:"host"`
Port string `json:"port" yaml:"port"`
} `json:"pprof" yaml:"pprof"`
EtcdConfig string `json:"etcdConfig" yaml:"etcdConfig"`
Etcd etcd.Config `json:"etcd" yaml:"etcd"`
API apiConfig.Config `json:"api" yaml:"api"`
}
type DebugRequest ¶
type DebugResult ¶
type Flow ¶
type Flow interface {
// Handler
// @description 执行流程插件
// @param request 执行参数 {"projectId":"项目id","flowId":"流程id","job":"流程实例id","elementId":"节点id","elementJob":"节点的实例id","config":{}} config 节点配置
// @return result "自定义返回的格式或者空"
Handler(ctx context.Context, app App, request *Request) (result map[string]interface{}, err error)
Debug(ctx context.Context, app App, request *DebugRequest) (result *DebugResult, err error)
}
Click to show internal directories.
Click to hide internal directories.