Documentation
¶
Index ¶
- Constants
- func InitEndpoint() error
- func InitEngine() error
- func NewConfig() (types.Config, error)
- func RegisterFunctions()
- type Aspect
- type DslParser
- func (p *DslParser) DecodeRuleChain(rootRuleChain []byte) (types.RuleChain, error)
- func (p *DslParser) DecodeRuleNode(rootRuleChain []byte) (types.RuleNode, error)
- func (p *DslParser) EncodeRuleChain(def interface{}) ([]byte, error)
- func (p *DslParser) EncodeRuleNode(def interface{}) ([]byte, error)
- type Edge
- type JsonParser
- func (p *JsonParser) DecodeRuleChain(rootRuleChain []byte) (types.RuleChain, error)
- func (p *JsonParser) DecodeRuleNode(rootRuleChain []byte) (types.RuleNode, error)
- func (p *JsonParser) EncodeRuleChain(def interface{}) ([]byte, error)
- func (p *JsonParser) EncodeRuleNode(def interface{}) ([]byte, error)
- type RuleChain
- type YamlParser
- func (p *YamlParser) DecodeRuleChain(rootRuleChain []byte) (types.RuleChain, error)
- func (p *YamlParser) DecodeRuleNode(rootRuleChain []byte) (types.RuleNode, error)
- func (p *YamlParser) EncodeRuleChain(def interface{}) ([]byte, error)
- func (p *YamlParser) EncodeRuleNode(def interface{}) ([]byte, error)
Constants ¶
View Source
const EndpointDirName = "endpoints"
Variables ¶
This section is empty.
Functions ¶
func InitEndpoint ¶
func InitEndpoint() error
func InitEngine ¶
func InitEngine() error
func RegisterFunctions ¶
func RegisterFunctions()
Types ¶
type DslParser ¶
type DslParser struct{}
func (*DslParser) DecodeRuleChain ¶
func (*DslParser) DecodeRuleNode ¶
func (*DslParser) EncodeRuleChain ¶
func (*DslParser) EncodeRuleNode ¶
type JsonParser ¶
type JsonParser struct{}
func (*JsonParser) DecodeRuleChain ¶
func (p *JsonParser) DecodeRuleChain(rootRuleChain []byte) (types.RuleChain, error)
func (*JsonParser) DecodeRuleNode ¶
func (p *JsonParser) DecodeRuleNode(rootRuleChain []byte) (types.RuleNode, error)
func (*JsonParser) EncodeRuleChain ¶
func (p *JsonParser) EncodeRuleChain(def interface{}) ([]byte, error)
func (*JsonParser) EncodeRuleNode ¶
func (p *JsonParser) EncodeRuleNode(def interface{}) ([]byte, error)
type RuleChain ¶
type RuleChain struct { // ID is the unique identifier of the rule chain. ID string `json:"id" yaml:"id"` // Name is the name of the rule chain. Name string `json:"name" yaml:"name"` // DebugMode indicates whether the node is in debug mode. If true, a debug callback function is triggered when the node processes messages. // This setting overrides the `DebugMode` configuration of the node. DebugMode bool `json:"debugMode" yaml:"debugMode"` // Root indicates whether this rule chain is a root or a sub-rule chain. (Used only as a marker, not applied in actual logic) Root bool `json:"root" yaml:"root"` // Disabled indicates whether the rule chain is disabled. Disabled bool `json:"disabled" yaml:"disabled"` // Configuration contains the configuration information of the rule chain. Configuration types.Configuration `json:"configuration,omitempty" yaml:"configuration"` // AdditionalInfo is an extension field. AdditionalInfo map[string]interface{} `json:"additionalInfo,omitempty" yaml:"additionalInfo"` // FirstNodeIndex is the index of the first node in data flow, default is 0. FirstNodeIndex int `json:"firstNodeIndex" yaml:"firstNodeIndex"` // Nodes are the component definitions of the nodes. Endpoints []*types.EndpointDsl `json:"endpoints,omitempty" yaml:"endpoints"` // Nodes are the component definitions of the nodes. // Each object represents a rule node within the rule chain. Nodes []*types.RuleNode `json:"nodes" yaml:"nodes"` // Connections define the connections between two nodes in the rule chain. Connections []types.NodeConnection `json:"connections" yaml:"connections"` // Deprecated: Use Flow Node instead. // RuleChainConnections are the connections between a node and a sub-rule chain. RuleChainConnections []types.RuleChainConnection `json:"ruleChainConnections,omitempty" yaml:"ruleChainConnections"` // Custom fields // Pipelines is node pipelines, if set pipelines will be used, otherwise will use connections Pipelines []string `json:"pipelines" yaml:"pipelines"` }
RuleChain defines a rule chain.
type YamlParser ¶
type YamlParser struct{}
func (*YamlParser) DecodeRuleChain ¶
func (p *YamlParser) DecodeRuleChain(rootRuleChain []byte) (types.RuleChain, error)
func (*YamlParser) DecodeRuleNode ¶
func (p *YamlParser) DecodeRuleNode(rootRuleChain []byte) (types.RuleNode, error)
func (*YamlParser) EncodeRuleChain ¶
func (p *YamlParser) EncodeRuleChain(def interface{}) ([]byte, error)
func (*YamlParser) EncodeRuleNode ¶
func (p *YamlParser) EncodeRuleNode(def interface{}) ([]byte, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.