Function nydus_api::http::start_http_thread
source · [−]pub fn start_http_thread(
path: &str,
api_notifier: Option<Arc<Waker>>,
to_api: Sender<Option<ApiRequest>>,
from_api: Receiver<ApiResponse>
) -> Result<(JoinHandle<Result<()>>, Arc<Waker>)>Expand description
Start a HTTP server to serve API requests.
Start a HTTP server parsing http requests and send to nydus API server a concrete
request to operate nydus or fetch working status.
The HTTP server sends request by to_api channel and wait for response from from_api channel.