https://github.com/xetdata/docker-volume-rs
Rust package to help create Docker Volumes
https://github.com/xetdata/docker-volume-rs
Last synced: 24 days ago
JSON representation
Rust package to help create Docker Volumes
- Host: GitHub
- URL: https://github.com/xetdata/docker-volume-rs
- Owner: xetdata
- License: bsd-3-clause
- Created: 2023-10-21T23:35:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-25T19:51:10.000Z (over 2 years ago)
- Last Synced: 2025-11-17T17:34:30.515Z (7 months ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```rust
#[async_trait]
impl VolumeDriver for XetDriver {
```
2. Initialize a `VolumeHandler` with either TCP or Unix Sockets
```rust
let driver = XetDriver::new(args.mount_root);
let handler = VolumeHandler::new(driver);
```
3. Call either `run_tcp` or `run_unix_socket` from the `VolumeHandler`
```rust
handler.run_tcp(tcp_args.port).await?;
```
## Installation
Add the following to your Cargo.tom
```toml
[dependencies]
docker-volume = "0.1.0"