start fleshing out documentation sections

This commit is contained in:
Joel Wetzell
2025-12-03 22:58:40 -06:00
parent d5664c7e84
commit 07a45776da
18 changed files with 264 additions and 21 deletions
@@ -0,0 +1,19 @@
---
title: Interval
sidebar:
order: 2
---
The interval module emits a message at a specified duration
- **type**: `gen.interval`
- **params**:
- **duration**: time in milliseconds between messsages
### Example snippet
Emits a message every 3 seconds
```
- id: every3Secs
type: gen.interval
params:
duration: 3000
```
@@ -0,0 +1,19 @@
---
title: Timer
sidebar:
order: 1
---
The timer module emits only one message after a specified duration
- **type**: `gen.timer`
- **params**:
- **duration**: time in milliseconds to wait before emitting message
### Example snippet
Emits a message 5 seconds after the module is initialized
```
- id: 5secs
type: gen.timer
params:
duration: 5000
```
@@ -0,0 +1,15 @@
---
title: HTTP Client
sidebar:
order: 1
---
The HTTP Client module emits a message contianing the response of the HTTP calls it makes.
- **type**: `net.http.client`
- **params**: no params are needed for HTTP client
### Example
```
- id: httpSender1
type: net.http.client
```
@@ -0,0 +1,19 @@
---
title: HTTP Server
sidebar:
order: 2
---
The HTTP server module emits a message for every HTTP request that is made to the server
- **type**: `net.http.server`
- **params**:
- **port**: TCP port to listen for HTTP requests on
### Example
Start an HTTP server listening on port 3000
```
- id: httpServer
type: net.http.server
params:
port: 3000
```
@@ -0,0 +1,27 @@
---
title: TCP Client
sidebar:
order: 3
---
The TCP client module connects to TCP server and emits a message for every message it receives from the server that it connects to. Messages are determined by "framing" techniques as TCP is a stream based protocol. The module will attempt to reconnect anytime the connection is closed.
- **type**: `net.tcp.client`
- **params**:
- **host**: IP or FQDN to connect to
- **port**: TCP port to connect to
- **framing**: how to chunk the TCP stream into "messages"
- LF `\n`
- CR `\r`
- CRLF `\r\n`
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
### Example
Open a TCP connection to `127.0.0.1` port 8888, any incoming data will be split on line-feed (`\n`)
```
- id: tcpClient
type: net.tcp.client
params:
host: 127.0.0.1
port: 8888
framing: LF
```
@@ -0,0 +1,27 @@
---
title: TCP Server
sidebar:
order: 4
---
The TCP server module emits a message for every message it receives from clients that connect to it. Messages are determined by "framing" techniques as TCP is a stream based protocol.
- **type**: `net.tcp.server`
- **params**:
- **ip**: (optional) IP address to bind the TCP server to, if left out it will listen on all interfaces
- **port**: TCP port to listen on
- **framing**: how to chunk of the incoming TCP stream into "messages"
- LF `\n`
- CR `\r`
- CRLF `\r\n`
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
### Example
Start a TCP server listening on port 8888, incoming data will be split on line-feed (`\n`)
```
- id: tcpServer
type: net.tcp.server
params:
ip: 127.0.0.1
port: 8888
framing: LF
```
@@ -0,0 +1,21 @@
---
title: UDP Client
sidebar:
order: 5
---
The UDP client module sends messages to a the configured `host` and `port`. This module does not receive any message and so using it as an `input` to a [route](/concepts/routes) would be pointless.
- **type**: `net.udp.client`
- **params**:
- **host**: IP or FQDN to send message to
- **port**: UDP port to send messages to
### Example
setup up a UDP client that will send UDP packets to `127.0.0.1` on port 8888
```
- id: udpClient
type: net.udp.client
params:
host: 127.0.0.1
port: 8888
```
@@ -0,0 +1,21 @@
---
title: UDP Server
sidebar:
order: 6
---
The UDP server module emits a message for every incoming UDP datagram.
- **type**: `net.udp.server`
- **params**:
- **ip**: (optional) IP address to bind the UDP server to, if left out it will listen on all interfaces
- **port**: UDP port to listen on
### Example
Start a UDP server listening on port 8888 and only on `127.0.0.1`
```
- id: udpServer
type: net.udp.server
params:
ip: 127.0.0.1
port: 8888
```