规则引擎

This commit is contained in:
PandaGoAdmin
2023-03-01 16:55:47 +08:00
parent 8e854ce527
commit 1be2dc7537
53 changed files with 1104 additions and 418 deletions

View File

@@ -0,0 +1,26 @@
package nodes
type externalRestapiNode struct {
bareNode
RestEndpointUrlPattern string
RequestMethod string
headers map[string]string
UseSimpleClientHttpFactory bool
ReadTimeoutMs int
MaxParallelRequestsCount int
UseRedisQueueForMsgPersistence bool
trimQueue bool
MaxQueueSize int
}
type externalRestapiNodeFactory struct{}
func (f externalRestapiNodeFactory) Name() string { return "ExternalRestapiNode" }
func (f externalRestapiNodeFactory) Category() string { return NODE_CATEGORY_EXTERNAL }
func (f externalRestapiNodeFactory) Create(id string, meta Metadata) (Node, error) {
labels := []string{"True", "False"}
node := &externalRestapiNode{
bareNode: newBareNode(f.Name(), id, meta, labels),
}
return decodePath(meta, node)
}