We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First, thanks for this crate. I have the following code:
#[tauri::command] async fn create_exec_listener(container_name: String, command: String, app_handle: AppHandle) { // let handle = app_handle.clone(); let docker = Docker::connect_with_socket("/Users/youri/.colima/docker.sock", 120, API_DEFAULT_VERSION).unwrap(); let exec = docker .create_exec( container_name.as_str(), CreateExecOptions { attach_stdout: Some(true), attach_stderr: Some(true), attach_stdin: Some(true), tty: Some(true), cmd: Some(vec!["sh"]), ..Default::default() }, ) .await .unwrap() .id; if let StartExecResults::Attached { mut output, mut input, } = docker.start_exec(&exec, None).await.unwrap() { input.write(command.as_bytes()).await.ok(); while let Some(Ok(output)) = output.next().await { println!("{}", output); } println!("done"); } }
How can I break out of the while loop? I need to send the user an event when the command is done.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
First, thanks for this crate. I have the following code:
How can I break out of the while loop? I need to send the user an event when the command is done.
The text was updated successfully, but these errors were encountered: