{"modulePath":"github.com/dracory/nodebase","version":"v0.15.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package join\n\nPackage join contains the join node implementation.\n\n## Types\n\n```go\ntype JoinConfig struct {\n\t// Mode selects grouping: \"auto\" uses the message's parts metadata\n\t// (split→join pairing); \"custom\" groups by count/timeout/complete;\n\t// \"reduce\" folds a parts sequence with ReduceExp\n\tMode string `json:\"mode\"`\n\t// Property is the message property joined and (for non-auto modes)\n\t// written on the result; \"payload\" (default) or a message path\n\tProperty string `json:\"property\"`\n\t// PropertyType is Node-RED's selector; \"full\" joins the whole\n\t// message object\n\tPropertyType string `json:\"propertyType\"`\n\t// Key is the message property read for the custom \"object\" build\n\t// key (default \"topic\")\n\tKey string `json:\"key\"`\n\t// Build selects the joined shape: \"array\" | \"object\" | \"merged\" | \"string\"\n\tBuild string `json:\"build\"`\n\t// Joiner is the delimiter used by the \"string\" build; escape\n\t// sequences like \\n are unescaped\n\tJoiner string `json:\"joiner\"`\n\t// JoinerType is Node-RED's joiner selector (\"str\" unescapes; other\n\t// values are taken literally)\n\tJoinerType string `json:\"joinerType\"`\n\t// Count is the custom-mode group size (auto mode uses parts.count)\n\tCount int `json:\"count\"`\n\t// Timeout flushes an incomplete custom-mode group after this many\n\t// seconds (0 = wait forever)\n\tTimeout float64 `json:\"timeout\"`\n\t// Accumulate keeps a custom-mode merged/object group open after\n\t// each emission so later messages keep merging\n\tAccumulate bool `json:\"accumulate\"`\n\t// UseParts preserves (false strips) parts metadata in custom mode;\n\t// Node-RED defaults to true\n\tUseParts *bool `json:\"useparts\"`\n\t// ReduceExp folds each sequence message into the accumulator —\n\t// JSONata-subset with $A (accumulator), $I (parts.index), $N (count)\n\tReduceExp string `json:\"reduceExp\"`\n\t// ReduceInit is the accumulator's initial value\n\tReduceInit string `json:\"reduceInit\"`\n\t// ReduceInitType interprets ReduceInit (\"num\"|\"json\"|\"str\"|\"bool\")\n\tReduceInitType string `json:\"reduceInitType\"`\n\t// ReduceFixup optionally post-processes the accumulator ($A, $N)\n\tReduceFixup string `json:\"reduceFixup\"`\n\t// ReduceRight folds the sequence in reverse index order\n\tReduceRight bool `json:\"reduceRight\"`\n\t// contains filtered or unexported fields\n}\n```\nJoinConfig holds configuration for the join node — the Node-RED join equivalent. Reassembles message sequences (typically produced by split) into a single message.\n\n```go\ntype JoinNode struct {\n\t*nodebase.BaseNode\n\t// contains filtered or unexported fields\n}\n```\nJoinNode reassembles message groups into a single joined message. It drops (returns nil) every message until its group completes.\n\n```go\nfunc NewJoinNode(node nodestore.NodeInterface, config *JoinConfig, host nodebase.NodeHost) *JoinNode\n```\nNewJoinNode creates a new join node\n\n```go\nfunc (n *JoinNode) Execute(ctx context.Context, input nodestore.MessageInterface) (nodestore.MessageInterface, error)\n```\nExecute buffers the message under its group id. Until the group is complete the message is dropped (nil return); on completion a single joined message is returned and flows downstream.\n\n```go\nfunc (n *JoinNode) Validate() error\n```\nValidate rejects unsupported mode/build combinations at deploy time\n\n","path":"github.com/dracory/nodebase/join","name":"join","synopsis":"Package join contains the join node implementation.","isRedistributable":true}
