|
|
před 3 roky | |
|---|---|---|
| .. | ||
| README.md | před 3 roky | |
| api.go | před 3 roky | |
Go handler to create external volume extensions for Docker.
This library is designed to be integrated in your program.
volume.Driver interface.volume.Handler with your implementation.ServeTCP or ServeUnix from the volume.Handler. d := MyVolumeDriver{}
h := volume.NewHandler(d)
h.ServeTCP("test_volume", ":8080")
d := MyVolumeDriver{}
h := volume.NewHandler(d)
u, _ := user.Lookup("root")
gid, _ := strconv.Atoi(u.Gid)
h.ServeUnix("test_volume", gid)