Unify cache polling on CACHE_STATUS and split API docs.

Replace separate accel/tap snapshot UART commands with one clients[] response
that omits unsubscribed fields; remove snapshot handlers and CLI commands.
Add goTool/docs for WebSocket streams and REST; tap-snapshot REST uses CACHE_STATUS.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-29 21:23:09 +02:00
co-authored by Cursor
parent a85d48320e
commit 31e539052a
25 changed files with 1243 additions and 1269 deletions
+4 -4
View File
@@ -199,14 +199,14 @@ func serveTapSnapshotGet(w http.ResponseWriter, r *http.Request, link *managedSe
writeJSON(w, http.StatusBadRequest, tapSnapshotAPIResponse{Error: err.Error()})
return
}
resp, err := link.readTapSnapshotPoll(clientID)
cache, err := link.readCacheStatusPoll()
if err != nil {
writeJSON(w, http.StatusServiceUnavailable, tapSnapshotAPIResponse{Error: err.Error()})
return
}
out := tapSnapshotAPIResponse{Events: make([]tapEventView, 0, len(resp.GetEvents()))}
for _, e := range resp.GetEvents() {
if !e.GetValid() {
out := tapSnapshotAPIResponse{Events: make([]tapEventView, 0)}
for _, e := range tapEventsFromCacheStatus(cache) {
if clientID != 0 && e.GetClientId() != clientID {
continue
}
out.Events = append(out.Events, tapEventView{