join

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package join contains the join node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JoinConfig

type JoinConfig struct {
	// Mode selects grouping: "auto" uses the message's parts metadata
	// (split→join pairing); "custom" groups by count/timeout/complete;
	// "reduce" folds a parts sequence with ReduceExp
	Mode string `json:"mode"`
	// Property is the message property joined and (for non-auto modes)
	// written on the result; "payload" (default) or a message path
	Property string `json:"property"`
	// PropertyType is Node-RED's selector; "full" joins the whole
	// message object
	PropertyType string `json:"propertyType"`
	// Key is the message property read for the custom "object" build
	// key (default "topic")
	Key string `json:"key"`
	// Build selects the joined shape: "array" | "object" | "merged" | "string"
	Build string `json:"build"`
	// Joiner is the delimiter used by the "string" build; escape
	// sequences like \n are unescaped
	Joiner string `json:"joiner"`
	// JoinerType is Node-RED's joiner selector ("str" unescapes; other
	// values are taken literally)
	JoinerType string `json:"joinerType"`
	// Count is the custom-mode group size (auto mode uses parts.count)
	Count int `json:"count"`
	// Timeout flushes an incomplete custom-mode group after this many
	// seconds (0 = wait forever)
	Timeout float64 `json:"timeout"`
	// Accumulate keeps a custom-mode merged/object group open after
	// each emission so later messages keep merging
	Accumulate bool `json:"accumulate"`
	// UseParts preserves (false strips) parts metadata in custom mode;
	// Node-RED defaults to true
	UseParts *bool `json:"useparts"`
	// ReduceExp folds each sequence message into the accumulator —
	// JSONata-subset with $A (accumulator), $I (parts.index), $N (count)
	ReduceExp string `json:"reduceExp"`
	// ReduceInit is the accumulator's initial value
	ReduceInit string `json:"reduceInit"`
	// ReduceInitType interprets ReduceInit ("num"|"json"|"str"|"bool")
	ReduceInitType string `json:"reduceInitType"`
	// ReduceFixup optionally post-processes the accumulator ($A, $N)
	ReduceFixup string `json:"reduceFixup"`
	// ReduceRight folds the sequence in reverse index order
	ReduceRight bool `json:"reduceRight"`
	// contains filtered or unexported fields
}

JoinConfig holds configuration for the join node — the Node-RED join equivalent. Reassembles message sequences (typically produced by split) into a single message.

type JoinNode

type JoinNode struct {
	*nodebase.BaseNode
	// contains filtered or unexported fields
}

JoinNode reassembles message groups into a single joined message. It drops (returns nil) every message until its group completes.

func NewJoinNode

func NewJoinNode(node nodestore.NodeInterface, config *JoinConfig, host nodebase.NodeHost) *JoinNode

NewJoinNode creates a new join node

func (*JoinNode) Execute

Execute 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.

func (*JoinNode) Validate

func (n *JoinNode) Validate() error

Validate rejects unsupported mode/build combinations at deploy time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL