swiftide_docker_executor/lib.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
//! A library for executing swiftide agent tools in a docker container
//!
//!
//! # Example
//!
//! ```no_run
//! # use swiftide_agents::Agent;
//! # use swiftide_docker_executor::DockerExecutor;
//! # use swiftide_agents::DefaultContext;
//! # use swiftide_core::ToolExecutor;
//!
//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let executor = DockerExecutor::default()
//! .with_context_path(".")
//! .with_image_name("test")
//! .with_dockerfile("Dockerfile.overwritten")
//! .to_owned()
//! .start().await.unwrap();
//!
//! let context = DefaultContext::from_executor(executor);
//! let agent = Agent::builder().context(context);
//! # Ok(())
//! # }
//! ```
mod client;
mod context_builder;
mod docker_tool_executor;
mod errors;
mod running_docker_executor;
#[cfg(test)]
mod tests;
pub use context_builder::*;
pub use docker_tool_executor::*;
pub use errors::*;
pub use running_docker_executor::*;