规则链

This commit is contained in:
XM-GO
2023-04-07 17:02:58 +08:00
parent adc96f4176
commit 282668c0f9
33 changed files with 403 additions and 104 deletions

View File

@@ -7,20 +7,14 @@ import (
type externalRestapiNode struct {
bareNode
RestEndpointUrlPattern string `json:"restEndpointUrlPattern" yaml:"restEndpointUrlPattern"`
RequestMethod string `json:"requestMethod" yaml:"requestMethod"`
headers map[string]string `json:"headers" yaml:"headers"`
UseSimpleClientHttpFactory bool `json:"useSimpleClientHttpFactory" yaml:"useSimpleClientHttpFactory"`
ReadTimeoutMs int `json:"readTimeoutMs" yaml:"readTimeoutMs"`
MaxParallelRequestsCount int `json:"maxParallelRequestsCount" yaml:"maxParallelRequestsCount"`
UseRedisQueueForMsgPersistence bool `json:"useRedisQueueForMsgPersistence" yaml:"useRedisQueueForMsgPersistence"`
trimQueue bool `json:"trimQueue" yaml:"trimQueue"`
MaxQueueSize int `json:"maxQueueSize" yaml:"maxQueueSize"`
RestEndpointUrlPattern string `json:"restEndpointUrlPattern" yaml:"restEndpointUrlPattern"`
RequestMethod string `json:"requestMethod" yaml:"requestMethod"`
headers map[string]string `json:"headers" yaml:"headers"`
}
type externalRestapiNodeFactory struct{}
func (f externalRestapiNodeFactory) Name() string { return "ExternalRestapiNode" }
func (f externalRestapiNodeFactory) Name() string { return "RestapiNode" }
func (f externalRestapiNodeFactory) Category() string { return NODE_CATEGORY_EXTERNAL }
func (f externalRestapiNodeFactory) Labels() []string { return []string{"Success", "Failure"} }
func (f externalRestapiNodeFactory) Create(id string, meta Metadata) (Node, error) {