Back to modules
v0.1.231

tinysystems/common-module

View Source

Container Image

europe-west2-docker.pkg.dev/tinyplatform/tinysystems/common-module-v0:0.1.231

Components 13 available

A

array_get

Get an element from an array by 1-based index. Returns the item or an error if index is out of range. Useful for numbered reference patterns where users select items by number from a previously displayed list.

A

array_split

Array iterator. Input: context + array. Emits one message per array element on Out, each containing {context, item}. Elements are processed sequentially - next item sent after previous Out completes. Use to process lists item by item.

A

async

Non-blocking pass-through. Returns immediately (unblocks sender), then emits context on Out in a goroutine. Limits concurrent goroutines via maxConcurrency setting to prevent memory issues.

C

cron

Scheduled emitter using cron expressions. Click Start to begin emitting context on Out port according to the schedule. Supports standard cron syntax (minute hour day-of-month month day-of-week). Examples: '*/5 * * * *' (every 5 min), '0 */2 * * *' (every 2 hours), '0 9 * * 1-5' (9 AM weekdays). Click Stop to pause. Cron survives pod restarts and leadership changes.

D

debug

Message sink for inspection. Receives messages on In (no output ports). Displays last received message in Control port. Use as flow endpoint to inspect data or terminate unused branches.

D

delay

Timed pause. Receives context + delay (ms) on In, sleeps for specified duration (blocking upstream), then emits context on Out. Use for rate limiting or adding pauses between operations.

G

group_by

Groups an array of items by a specified field path. Input: items array + groupByPath (e.g., 'labels.app'). Output: array of groups sorted by key, each with key, items, and count.

I

inject

Injects stored configuration into passing messages. Send config once, then every message passing through gets it attached. Config persists across pod restarts via metadata.

K

kv

Key-value store backed by TinyNode metadata. Stores documents with a configurable schema and primary key. Supports JSONPath queries. Persistence is best-effort: writes are debounced (1s) before patching K8s, so data may be lost on pod crash within that window. Multi-pod safe via leader-reader pattern but eventually consistent. Best suited for state that gets periodically refreshed.

R

router

Conditional message router. Configure routes via settings (e.g., routes=["POST", "OTHER"]). Output ports are named out_ (e.g., out_post, out_other). Input: context (data to forward) + conditions array (each with route name and boolean). Routes context to FIRST condition where condition=true. If NO condition is true: with enableDefaultPort=true, routes to 'default' port (use for else/fallback logic); with enableDefaultPort=false, message is dropped.

S

signal

Flow trigger. Click Send to emit configured context on Out port and start the flow. The Out port is a blocking port - Signal keeps running (edge animated) until the connected component stops or Reset is clicked. Use as entry point - connect Out to components you want to activate when flow starts.

T

ticker

Periodic emitter. Click Start to begin emitting context on Out. Waits for Out port to complete, then waits [delay] ms before next emit. Click Stop to pause. Survives pod restarts via metadata persistence.

T

transform

Data transformer for connecting output back to input on the SAME node (e.g., http_server request→response loops). AVOID using modify between DIFFERENT nodes - configure data mapping directly on the edge instead. Edge configuration can set literal values and map fields without needing modify in between.

Release Notes

Tiny Systems Common Module

Core building blocks for flow-based automations on the Tiny Systems platform.

Components

Component Description
Router Conditional message routing based on expressions
Debug Inspect and log messages passing through a flow
Cron Schedule-based flow trigger (cron expressions)
Signal Manual flow trigger with configurable context
Delay Pause execution for a specified duration
Array Get Extract elements from an array by index
Ticker Interval-based recurring trigger
Group By Group incoming messages by key
Async Non-blocking message passthrough (fire-and-forget)
Split Array Split an array into individual messages
Inject Data enrichment -- merge additional data into messages
Modify Transform and reshape message data
Key-Value Store In-memory key-value storage for flow state

Installation

helm repo add tinysystems https://tiny-systems.github.io/module/
helm install common-module tinysystems/tinysystems-operator \
  --set controllerManager.manager.image.repository=ghcr.io/tiny-systems/common-module

Run locally

go run cmd/main.go run --name=common-module --namespace=tinysystems --version=1.0.0

Part of Tiny Systems

This module is part of the Tiny Systems platform -- a visual flow-based automation engine running on Kubernetes.

License

This module's source code is MIT-licensed. It depends on the Tiny Systems Module SDK (BSL 1.1). See LICENSE for details.