feat: remove rss, status, and badge features
This commit is contained in:
parent
553d7d1780
commit
36720e2ba5
21 changed files with 904 additions and 1200 deletions
|
|
@ -1,8 +1,8 @@
|
|||
# Cache Service
|
||||
|
||||
The central hub. Sits between the Pi and everything else.
|
||||
The central hub. Sits between the Pi and Discord.
|
||||
|
||||
It does two things: polls the Pi on a timer to keep a local copy of the door state, and receives push webhooks from the Pi when the state actually changes. Either way, updates get written to SQLite and forwarded to downstream services (Discord, etc.) via outbound webhooks.
|
||||
It does two things: polls the Pi on a timer to keep a local copy of the door state, and receives push webhooks from the Pi when the state actually changes. Either way, updates get written to SQLite and forwarded to downstream services via outbound webhooks.
|
||||
|
||||
If the Pi stops responding to polls (configurable threshold, default 3 misses), the cache marks it as offline and notifies downstream.
|
||||
|
||||
|
|
@ -10,12 +10,12 @@ If the Pi stops responding to polls (configurable threshold, default 3 misses),
|
|||
|
||||
| Method | Path | Auth | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `GET` | `/status` | — | Current door status (`status`, `timestamp`, `last_seen`) |
|
||||
| `GET` | `/info` | — | Cached Pi system info |
|
||||
| `GET` | `/history` | — | Last 100 state changes |
|
||||
| `GET` | `/status` | — | Current door status (`status`, `since`, `last_checked`) |
|
||||
| `POST` | `/webhook` | Bearer | Inbound webhook from the Pi |
|
||||
| `GET` | `/health` | — | Health check |
|
||||
|
||||
`since` is the Pi-reported time when the current state began. `last_checked` is when the cache most recently attempted a poll.
|
||||
|
||||
## Configuration
|
||||
|
||||
NixOS options under `services.noisebell-cache`:
|
||||
|
|
@ -28,7 +28,6 @@ NixOS options under `services.noisebell-cache`:
|
|||
| `inboundApiKeyFile` | required | Key file for validating inbound webhooks |
|
||||
| `port` | `3000` | Listen port |
|
||||
| `statusPollIntervalSecs` | `60` | How often to poll `GET /` on the Pi |
|
||||
| `infoPollIntervalSecs` | `300` | How often to poll `GET /info` on the Pi |
|
||||
| `offlineThreshold` | `3` | Consecutive failed polls before marking offline |
|
||||
| `retryAttempts` | `3` | Outbound webhook retry count |
|
||||
| `retryBaseDelaySecs` | `1` | Exponential backoff base delay |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue