Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
shim refactor volume Aug 15, 2017
README.md Inclusion of Nemo in the examples Aug 22, 2018
api.go gofmt on all Sep 11, 2018
api_test.go

README.md

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:

  d := MyVolumeDriver{}
  h := volume.NewHandler(d)
  h.ServeTCP("test_volume", ":8080")

Example using Unix sockets:

  d := MyVolumeDriver{}
  h := volume.NewHandler(d)
  u, _ := user.Lookup("root")
  gid, _ := strconv.Atoi(u.Gid)
  h.ServeUnix("test_volume", gid)

Full example plugins