Documentation
¶
Overview ¶
Package debug contains the debug node implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DebugConfig ¶
type DebugConfig struct {
// Active toggles the node; false means deployed but muted (no events)
Active *bool `json:"active"`
// Console also prints the formatted value to stdout
Console bool `json:"console"`
// Complete selects what is displayed: "payload" (Data only),
// "true" (the whole payload including Metadata) or "false"
// (a bare marker, Node-RED's "node name only" behaviour)
Complete string `json:"complete"`
// StatusVal is an optional property path whose value is also
// reported as the node's status text (emitted as an extra event)
StatusVal string `json:"statusVal"`
}
DebugConfig holds configuration for the debug node
type DebugNode ¶
DebugNode passes the payload through unchanged; the formatted debug value is emitted into the workflow event log by the host so it shows up in the editor's debug panel (Node-RED debug node)
func NewDebugNode ¶
func NewDebugNode(node nodestore.NodeInterface, config *DebugConfig) *DebugNode
NewDebugNode creates a new debug node
func (*DebugNode) Execute ¶
func (n *DebugNode) Execute(ctx context.Context, input nodestore.MessageInterface) (nodestore.MessageInterface, error)
Execute passes the input payload through unchanged
func (*DebugNode) PostRunEvents ¶
func (n *DebugNode) PostRunEvents(node nodestore.NodeInterface, out nodestore.MessageInterface) []nodebase.RunEvent
PostRunEvents implements RunEventer: the debug node emits the formatted message value into the event log so it renders in the editor's debug panel; console=true also prints it to stdout, and a configured statusVal is reported as an extra "status" event. active=false mutes the node entirely.