Update README and API for Docker integration and app management

- Revised README.md to clarify the use of Docker alongside Podman for containerization.
- Updated API documentation to reflect new RPC endpoints, including `auth.logout`.
- Enhanced WebSocket handling in the API for better connection management.
- Modified Neode UI to utilize a curated list of Docker-based applications, replacing previous Start9 registry calls.
- Improved error handling and logging in the marketplace for better user experience.
This commit is contained in:
Dorian
2026-01-27 22:55:20 +00:00
parent 10fa19df66
commit 7afefafec1
14 changed files with 1406 additions and 179 deletions

View File

@@ -80,17 +80,35 @@ impl ApiHandler {
let (mut tx, mut rx) = ws_stream.split();
// Send periodic pings to keep connection alive
let ping_interval = tokio::time::interval(tokio::time::Duration::from_secs(30));
tokio::pin!(ping_interval);
// Keep connection open; UI may send/receive JSON patches. For now just accept and ignore.
while let Some(msg) = rx.next().await {
match msg {
Ok(Message::Close(_)) => break,
Ok(Message::Ping(data)) => {
let _ = tx.send(Message::Pong(data)).await;
loop {
tokio::select! {
_ = ping_interval.tick() => {
if tx.send(Message::Ping(vec![])).await.is_err() {
debug!("Failed to send ping, connection likely closed");
break;
}
}
Ok(_) => {}
Err(e) => {
debug!("WebSocket stream error: {}", e);
break;
msg = rx.next() => {
match msg {
Some(Ok(Message::Close(_))) => break,
Some(Ok(Message::Pong(_))) => {
debug!("Received pong");
}
Some(Ok(Message::Ping(data))) => {
let _ = tx.send(Message::Pong(data)).await;
}
Some(Ok(_)) => {}
Some(Err(e)) => {
debug!("WebSocket stream error: {}", e);
break;
}
None => break,
}
}
}
}