mcai-docker

Crates.iomcai-docker
lib.rsmcai-docker
version0.2.2
sourcesrc
created_at2022-06-10 13:57:40.424789
updated_at2024-05-07 19:11:29.955941
descriptionLibrary to start and stop MCAI workers images with Docker.
homepage
repository
max_upload_size
id603578
size14,796
Marc-Antoine ARNAUD (MarcAntoine-Arnaud)

documentation

README

MCAI Docker

This crate is a wrapper on bollard crate to enable starting a MCAI worker with Docker.

Usage

use bollard::Docker;
use mcai_docker::McaiDocker;
use std::io::stdout;

#[tokio::main]
async fn main() {
  let docker = Docker::connect_with_socket_defaults().unwrap();
  let mcai_docker = McaiDocker::new(docker);
  mcai_docker
    .run_worker(
      "mcai_worker_image_name",
      &[("KEY1", Box::new("VALUE1"))],
      Some(&mut stdout()),
    )
    .await
    .unwrap();
}
Commit count: 0

cargo fmt