Discover Packages
github.com/bogdanovich/mintclaw
examples
mintclaw-echo-server
command
Version:
v0.1.0-p8a.2
Opens a new window with list of versions in this module.
Published: Aug 10, 2026
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
mintclaw-echo-server
Minimal MintClaw Protocol WebSocket server for testing the mintclaw_client channel.
Usage
go run ./examples/mintclaw-echo-server -addr :9090 -token secret
Flags
Flag
Default
Description
-addr
:9090
Listen address
-token
(none)
Auth token; empty disables auth
How it works
Listens for WebSocket connections at /ws
Authenticates via Authorization: Bearer <token> header or ?token=<token> query param
Prints received message.send content to stdout
Responds to ping with pong
Lines typed into stdin are broadcast as message.create to all connected clients
Testing with mintclaw_client
Start the server:
go run ./examples/mintclaw-echo-server -token mytoken
Configure mintclaw_client in your config.json:
{
"channel_list": {
"mintclaw_client": {
"enabled": true,
"url": "ws://localhost:9090/ws",
"token": "mytoken",
"session_id": "test-session"
}
}
}
Start mintclaw — the client connects and you can exchange messages interactively via stdin/stdout.
Expand ▾
Collapse ▴
Documentation
¶
mintclaw-echo-server is a minimal MintClaw Protocol WebSocket server for testing
the mintclaw_client channel. It accepts connections, prints received messages
to stdout, and forwards stdin lines as message.create to all connected clients.
Usage:
go run ./examples/mintclaw-echo-server -addr :9090 -token secret
Then configure mintclaw_client with url=ws://localhost:9090/ws&token=secret.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.