agent,manager,node: define our own plugin ifaces #3171
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What I did
Allow Moby plugins to be used without Swarmkit having to import github.com/docker/docker packages by defining our own interfaces which cover the subset of functionality we use. Adapters will have to be written on the Moby side as their API contains methods which return concrete struct types, but they only need to be trivial wrappers as their
*plugins.Client
satisfies ourplugin.Client
interface.The manager/allocator/cnmallocator package was not modified and continues to import the plugin types defined in github.com/docker/docker. It also imports many other packages under github.com/docker/docker. The package will be moved out of Swarmkit into github.com/docker/docker as the final step of dropping our dependency on docker/docker.
- How I did it
- How to test it
- Description for the changelog
(node.Config).PluginGetter
is now an interface defined in the swarmkit module which"github.com/docker/docker/plugin".Store
does not satisfy. Adapter types may be required.