Split ws from jobsearch as a separate test utility rather than a feature of jobsearch

This commit is contained in:
bwilliams committed 2026-10-16 08:58:25 +01:00
1 parent b714ee14d5
commit 5e61c11eb9
9 files changed
+148 -38

No files matched your search

+13
View File
@@ -98,12 +98,25 @@ sources:
See [internal/mock](internal/mock/README.md) for its options and behaviour.
## WebSocket test tool
`ws-test` reads the same configuration as `job-search` for its defaults:
```bash
go run ./cmd/ws-test dial --ping # ping the HTTP server's /ws endpoint
go run ./cmd/ws-test dial # send each line of stdin, print replies
go run ./cmd/ws-test serve # plain TCP server for websocket hub clients
```
`dial` also takes `--message`, `--listen`, `--origin` (to test the Origin
check), `--url` and `--timeout`; see `ws-test dial --help`.
## Project layout
| Path | Contents |
|---|---|
| `cmd/jobsearch` | The `job-search` command |
| `cmd/mock-fts` | The mock FTS server |
| `cmd/ws-test` | The `ws-test` WebSocket test tool |
| `internal/cli` | Cobra commands and shared CLI setup |
| `internal/config` | Configuration loading, validation and editing |
| `internal/fetcher` | Runs a worker per enabled source |