update docs for route changes

This commit is contained in:
Joel Wetzell
2026-03-04 21:50:01 -06:00
parent 02522a52b5
commit 44a60b0d1a
10 changed files with 67 additions and 17 deletions
+5
View File
@@ -65,6 +65,11 @@ export default defineConfig({
{ {
label: 'Processors', label: 'Processors',
items: [ items: [
{
label: "Router",
collapsed: true,
autogenerate: { directory: 'processors/router' }
},
{ {
label: "Int", label: "Int",
collapsed: true, collapsed: true,
+10
View File
@@ -2164,6 +2164,7 @@
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"bin": { "bin": {
"acorn": "bin/acorn" "acorn": "bin/acorn"
}, },
@@ -2187,6 +2188,7 @@
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"fast-uri": "^3.0.1", "fast-uri": "^3.0.1",
@@ -2362,6 +2364,7 @@
"integrity": "sha512-CHiohwJIS4L0G6/IzE1Fx3dgWqXBCXus/od0eGUfxrZJD2um2pE7ehclMmgL/fXqbU7NfE1Ze2pq34h2QaA6iQ==", "integrity": "sha512-CHiohwJIS4L0G6/IzE1Fx3dgWqXBCXus/od0eGUfxrZJD2um2pE7ehclMmgL/fXqbU7NfE1Ze2pq34h2QaA6iQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@astrojs/compiler": "^2.13.0", "@astrojs/compiler": "^2.13.0",
"@astrojs/internal-helpers": "0.7.5", "@astrojs/internal-helpers": "0.7.5",
@@ -6360,6 +6363,7 @@
} }
], ],
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"nanoid": "^3.3.8", "nanoid": "^3.3.8",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
@@ -6415,6 +6419,7 @@
"integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"bin": { "bin": {
"prettier": "bin/prettier.cjs" "prettier": "bin/prettier.cjs"
}, },
@@ -6928,6 +6933,7 @@
"integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==", "integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/estree": "1.0.8" "@types/estree": "1.0.8"
}, },
@@ -7364,6 +7370,7 @@
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"peer": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
@@ -7760,6 +7767,7 @@
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"esbuild": "^0.25.0", "esbuild": "^0.25.0",
"fdir": "^6.4.4", "fdir": "^6.4.4",
@@ -8177,6 +8185,7 @@
"integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==",
"dev": true, "dev": true,
"license": "ISC", "license": "ISC",
"peer": true,
"bin": { "bin": {
"yaml": "bin.mjs" "yaml": "bin.mjs"
}, },
@@ -8330,6 +8339,7 @@
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"funding": { "funding": {
"url": "https://github.com/sponsors/colinhacks" "url": "https://github.com/sponsors/colinhacks"
} }
+3 -4
View File
@@ -4,11 +4,10 @@ sidebar:
order: 3 order: 3
--- ---
Routes take the messages coming from a module and push them out another module. The message can be optionally "processed" with any number of processor steps. Routes take the messages coming from a module and push them through a list of [processors](/concepts/processors). Having no processors is valid but serves no real purpose and is basically a no-op.
## YAML Definition ## YAML Definition
- **input**: the id of the [module](/concepts/modules) that will provide messages to this route - **input**: the id of the [module](/concepts/modules) that will provide messages to this route
- **processors**: (optional) array of [processors](/concepts/processors) that will be called in order and the result of the previous will be fed to the next processor. - **processors**: (optional) array of [processors](/concepts/processors) that will be called in order and the result of the previous will be fed to the next processor.
- if at any point the output of a processor is `nil` the entire route will be terminated (subject to change to support output `nil` values?) - if at any point the output of a processor is `nil` the entire route will be terminated (subject to change to support passing through `nil` values?)
- an error in a processor step will also result in the route being terminated - an error in a processor step will result in the individual route being terminated
- **output**: the id of the [module](/concepts/modules) that will consume messages from the route
+4 -2
View File
@@ -24,9 +24,11 @@ routes:
processors: processors:
- type: osc.message.create - type: osc.message.create
params: params:
address: "/cue/{{.To}}/go" address: "/cue/{{.Payload.To}}/go"
- type: osc.message.encode - type: osc.message.encode
output: udp - type: router.output
params:
module: udp
` `
<Code code={example} title="config.yaml" lang="yaml"/> <Code code={example} title="config.yaml" lang="yaml"/>
+4 -2
View File
@@ -25,9 +25,11 @@ routes:
processors: processors:
- type: osc.message.create # create OSC message - type: osc.message.create # create OSC message
params: params:
address: "{{.URL.Path}}" # template the address from the incoming message address: "{{.Payload.URL.Path}}" # template the address from the incoming message
- type: osc.message.encode # turn OSC message into bytes - type: osc.message.encode # turn OSC message into bytes
output: udp - type: router.output # output to the udp module
params:
module: udp
` `
<Code code={example} title="config.yaml" lang="yaml"/> <Code code={example} title="config.yaml" lang="yaml"/>
+1 -1
View File
@@ -10,7 +10,7 @@ import { Aside } from '@astrojs/starlight/components';
This module is not currently included in the pre-compiled binaries for [showbridge](https://github.com/jwetzell/showbridge-go/releases/latest) This module is not currently included in the pre-compiled binaries for [showbridge](https://github.com/jwetzell/showbridge-go/releases/latest)
</Aside> </Aside>
The `midi.input` module connects to a midi device (or virtual device) and emits MIDI messages that come in on that port. This module does not output any message and so using it as an `output` of a [route](/concepts/routes) would be pointless. The `midi.input` module connects to a midi device (or virtual device) and emits MIDI messages that come in on that port. This module does not support output.
- **type**: `midi.input` - **type**: `midi.input`
- **params**: - **params**:
@@ -0,0 +1,17 @@
---
title: Router Output
sidebar:
order: 1
---
The `router.output` processor takes any payload and outputs to the specified module.
- **type**: `router.output`
- **params**:
- **module**: the id of the [module](/concepts/modules) to output to.
### Example
Output to the `osc-out` module.
```
- type: router.output
params:
module: osc-out
```
@@ -1,8 +0,0 @@
---
title: Dictionary
---
- **router**: throughout documentation I will use the term router to refer to configured/running instance of showbridge
- **modules**: modules are configured instances that can produce or consume message like a TCP server or a UDP client
- **routes**: routes take messages coming from a module (input), do some optional processing and send that message to a module (output)
- **processors**: processors process messages, the processors are localized to the route the processor is a part of. Examples of processors or turning bytes into an OSC message or parsing a string into an integer
@@ -0,0 +1,18 @@
---
title: Dictionary
---
- **router**: throughout documentation I will use the term router to refer to a configured/running instance of showbridge
- **modules**: modules are configured instances that can produce or consume message like a TCP server or a UDP client
- **routes**: routes take messages coming from a module (input), pass the
- **processors**: processors process messages, this can be anything such as:
- [decoding bytes into a string](/processors/string/decode)
- [creating random numbers](/processors/int/random)
- [filtering OSC message](/processors/osc/message/filter)
- [running custom JavaScript snippets](/processors/script/js)
import { Aside } from '@astrojs/starlight/components';
<Aside type="note">
Router output is also handled by [a processor](/processors/router/output)!
</Aside>
+5
View File
@@ -13,6 +13,7 @@ showbridge is a kind of re-imagining of [OSCulator](https://osculator.net/) take
- UDP - UDP
- client - client
- server - server
- multicast client
- TCP - TCP
- client - client
- server - server
@@ -20,8 +21,12 @@ showbridge is a kind of re-imagining of [OSCulator](https://osculator.net/) take
- client - client
- [NATS](https://nats.io/) - [NATS](https://nats.io/)
- client - client
- server
- [PosiStageNet](https://posistage.net/) - [PosiStageNet](https://posistage.net/)
- client - client
- [SIP](https://datatracker.ietf.org/doc/html/rfc3261)
- call server
- [DTMF](https://en.wikipedia.org/wiki/DTMF_signaling) server
- MIDI - MIDI
- input (not included in pre-built binaries yet) - input (not included in pre-built binaries yet)
- output (not included in pre-built binaries yet) - output (not included in pre-built binaries yet)