WorkerClient
Worker
StreamService
HttpServiceHandler
Tokio
(token, web::App)
poll()
rx.poll_next()
WorkerCommand(Conn)
check_readiness()
Worker::services[Conn.token]
call(ServerMessage::Connect(stream))
call(stream)
HttpServiceHandlerResponse as Future
spawn(HttpServiceHandlerResponse)
WorkerState::Unavailable
WorkerState::Restarting
alt
[ check_readiness() -> Ok(true) ]
[ check_readiness() -> Ok(false) ]
[ check_readiness() -> Err(token,idx) ]
loop
[ ]
alt
[ WorkerState::Available ]
process connection
WorkerClient
Worker
StreamService
HttpServiceHandler
Tokio