Initial commit

This commit is contained in:
2022-06-02 08:05:25 +02:00
commit dfbbc0ee5f
316 changed files with 151609 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
# Docker volume extension api.
Go handler to create external volume extensions for Docker.
## Usage
This library is designed to be integrated in your program.
1. Implement the `volume.Driver` interface.
2. Initialize a `volume.Handler` with your implementation.
3. Call either `ServeTCP` or `ServeUnix` from the `volume.Handler`.
### Example using TCP sockets:
```go
d := MyVolumeDriver{}
h := volume.NewHandler(d)
h.ServeTCP("test_volume", ":8080")
```
### Example using Unix sockets:
```go
d := MyVolumeDriver{}
h := volume.NewHandler(d)
u, _ := user.Lookup("root")
gid, _ := strconv.Atoi(u.Gid)
h.ServeUnix("test_volume", gid)
```
## Full example plugins
- https://github.com/calavera/docker-volume-glusterfs
- https://github.com/calavera/docker-volume-keywhiz
- https://github.com/quobyte/docker-volume