switch-routing

command
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 10 Imported by: ? modules, 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.

README

Switch Routing

A noderun workflow demonstrating conditional routing with the switch node:

inject (42) ──╮
              ├─→ switch ──output_1 (gt 30)──→ change "hot"  ──╮
inject (10) ──╯        └─output_2 (otherwise)─→ change "cold" ──┴─→ debug

Two inject nodes fire once on deploy with numeric payloads 42 and 10. The switch node routes messages above 30 to its first output and everything else to the otherwise port. Each branch formats the reading with a JSONata change rule, and both branches converge on one debug node printing to stdout.

Run from the noderun module root:

go run ./examples/switch-routing

Expected output (order may vary):

42 is hot (above 30)
10 is cold (30 or below)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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