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:
+4
-4
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user