Skip to content

Adds shim layer for writing volume drivers#34

Merged
runcom merged 1 commit intodocker:masterfrom
cpuguy83:add_shim_for_volumedriver
Feb 17, 2016
Merged

Adds shim layer for writing volume drivers#34
runcom merged 1 commit intodocker:masterfrom
cpuguy83:add_shim_for_volumedriver

Conversation

@cpuguy83
Copy link
Copy Markdown
Contributor

This allows a plugin writer to not care about the plugin API and rather
focus on the volume driver API from engine.

As an example, engine's built-in local driver can operate as a plugin
with no extra effort with this shim layer.

@cpuguy83
Copy link
Copy Markdown
Contributor Author

Just throwing this out there. Had the idea while reviewing the graphdriver PR... which itself has simpler types.
This would require importing github.com/docker/docker/volume for access to volume.Driver and volume.Volume.
We can get rid of the need for volume.Driver, but would still require volume.Volume.

This allows a plugin writer to not care about the plugin API and rather
focus on the volume driver API from engine.

As ane example, engine's built-in `local` driver can operate as a plugin
with no extra effort with this shim layer.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 force-pushed the add_shim_for_volumedriver branch from c02def9 to 61113e3 Compare February 17, 2016 15:25
@cpuguy83
Copy link
Copy Markdown
Contributor Author

ping @calavera

@calavera
Copy link
Copy Markdown
Contributor

LGTM

1 similar comment
@runcom
Copy link
Copy Markdown
Collaborator

runcom commented Feb 17, 2016

LGTM

runcom added a commit that referenced this pull request Feb 17, 2016
Adds shim layer for writing volume drivers
@runcom runcom merged commit c9f224a into docker:master Feb 17, 2016
@cpuguy83 cpuguy83 deleted the add_shim_for_volumedriver branch February 17, 2016 18:12
@h0tbird
Copy link
Copy Markdown

h0tbird commented Feb 18, 2016

Be aware of that:

# github.com/docker/go-plugins-helpers/volume
../../go/src/github.com/docker/go-plugins-helpers/volume/shim.go:20: too many arguments in call to d.d.Create
../../go/src/github.com/docker/go-plugins-helpers/volume/shim.go:29: d.d.List undefined (type volume.Driver has no field or method List)
../../go/src/github.com/docker/go-plugins-helpers/volume/shim.go:49: d.d.Get undefined (type volume.Driver has no field or method Get)
../../go/src/github.com/docker/go-plugins-helpers/volume/shim.go:63: d.d.Get undefined (type volume.Driver has no field or method Get)
../../go/src/github.com/docker/go-plugins-helpers/volume/shim.go:76: d.d.Get undefined (type volume.Driver has no field or method Get)
../../go/src/github.com/docker/go-plugins-helpers/volume/shim.go:87: d.d.Get undefined (type volume.Driver has no field or method Get)
../../go/src/github.com/docker/go-plugins-helpers/volume/shim.go:102: d.d.Get undefined (type volume.Driver has no field or method Get)

@cpuguy83
Copy link
Copy Markdown
Contributor Author

@h0tbird Do you have your vendor of Docker up to date?

@h0tbird
Copy link
Copy Markdown

h0tbird commented Feb 18, 2016

I am running on an updated Arch Linux with Docker:

# docker version
Client:
 Version:      1.10.1
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   9e83765
 Built:        Fri Feb 12 00:52:02 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.1
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   9e83765
 Built:        Fri Feb 12 00:52:02 2016
 OS/Arch:      linux/amd64

@cpuguy83
Copy link
Copy Markdown
Contributor Author

@h0tbird The docker source code needs to be using the 1.10.1 tag. It seems you've got a different versin checked out.

@h0tbird
Copy link
Copy Markdown

h0tbird commented Feb 18, 2016

@cpuguy83 Thank you. I see my error, it works now. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants