Skip to main content

serve

Function serve 

Source
pub async fn serve(
    listener: TcpListener,
    socket: &Path,
    proxies: &[Origin],
    sessions: Arc<Sessions>,
    stop: impl Future<Output = ()> + Send + 'static,
) -> Result<()>
Expand description

Serves the dashboard on listener for the daemon whose API is on socket, until stop completes. Pages from proxies ([web] origins), reverse proxies in front of it, may write too. A browser signed in to sessions is let in. Writes a one-time login link per address to login_file(socket) and removes it when done.