1 unstable release

0.1.1 Oct 25, 2023
0.1.0 Oct 23, 2023

#903 in Filesystem

40 downloads per month

BSD-3-Clause

13KB
262 lines

docker-volume-rs

Overview

A helper package to create docker volumes in Rust, inspired by https://github.com/docker/go-plugins-helpers

Usage

  1. Implement the VolumeDriver async_trait
#[async_trait]
impl VolumeDriver for XetDriver {
  1. Initialize a VolumeHandler with either TCP or Unix Sockets
let driver = XetDriver::new(args.mount_root);
let handler = VolumeHandler::new(driver);
  1. Call either run_tcp or run_unix_socket from the VolumeHandler
handler.run_tcp(tcp_args.port).await?;

Installation

Add the following to your Cargo.tom

[dependencies]
docker-volume = "0.1.0"

Dependencies

~12–25MB
~313K SLoC