scr-axum-cranker-router

Crates.ioscr-axum-cranker-router
lib.rsscr-axum-cranker-router
version0.0.4
sourcesrc
created_at2024-06-01 18:26:32.619051
updated_at2024-10-23 09:49:36.513454
descriptionA Rust port of mu-cranker-router
homepagehttps://github.com/gyakkun/scr-axum-cranker-router
repositoryhttps://github.com/gyakkun/scr-axum-cranker-router
max_upload_size
id1258808
size317,255
Gyakkun (gyakkun)

documentation

README

scr-axum-cranker-router

A Rust port of mu-cranker-router

"scr" means from scratch, there was a "cranker-ruster" previously when Rust was too hard for me. Rust is still too hard, but it's not so painful now, that's why this one is written from scratch again.

TODO

  • Replace VecDeque with a timeout-able mpsc channel for polling router socket
  • [ ] Define errors with thiserror crate Current approach should be adequate.
  • [ ] Wrap the whole thing into a tower service Looks like tower http not designed for WebSocket so no way
  • V3 support
  • Handle invalid router socket
  • Invoke listeners at hooking point Invoke on_failure_to_acquire_proxy_socket in ProxyListener
  • Add health map for observability. To achieve this we need to change the current Arc<dyn RouteSocket> in route_to_socket_chan to Weak<_>, and store the only Arc in a global map in the AppState. Reference WebSocketFarm in mu cranker router. WebSocketFarm done. The /health/connectors is available by default.
  • Deregister handler
  • [ ] Replace all unnecessary async mpmc unbounded channel with tokio's mpsc unbounded channel. Abandoned.
  • Dark mode manager
  • Tidy up access modifiers, expose as little implementation details as possible.
  • Consider tracing crate for logging
  • Get rid of the rfc7239 crate which has bug in parsing host with port
  • Documentation. Migrate from java doc for all public available code.
  • Graceful shutdown. Check simple_v1.
Commit count: 205

cargo fmt