1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg
Brian Goff 8b31f217ff Refcount graphdriver plugins properly
Adds 2 new methods to v2 plugin `Acquire` and `Release` which allow
refcounting directly at the plugin level instead of just the store.
Since a graphdriver is initialized exactly once, and is really managed
by a separate object, it didn't really seem right to call
`getter.Get()` to refcount graphdriver plugins.
On shutdown it was particularly weird where we'd either need to keep a
driver reference in daemon, or keep a reference to the pluggin getter in
the layer store, and even then still store extra details on if the
graphdriver is a plugin or not.

Instead the plugin proxy itself will handle calling the neccessary
refcounting methods directly on the plugin object.

Also adds a new interface in `plugingetter` to account for these new
functions which are not going to be implemented by v1 plugins.

Changes terms `plugingetter.CREATE` and `plugingetter.REMOVE` to
`ACQUIRE` and `RELEASE` respectively, which seems to be better
adjectives for what we're doing.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit f29bbd16f5)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-13 19:56:51 -08:00
..
aaparser fix apparmor load profile 2016-12-09 14:10:58 -08:00
archive
authorization
broadcaster
chrootarchive
devicemapper
directory
discovery
filenotify
fileutils
fsutils
gitutils
graphdb Windows: Factor out sqlite 2016-12-02 13:40:06 -08:00
homedir
httputils
idtools
integration
ioutils
jsonlog
jsonmessage
listeners
locker
longpath
loopback
mount
namesgenerator
parsers
pidfile
platform
plugingetter Refcount graphdriver plugins properly 2016-12-13 19:56:51 -08:00
plugins plugins: container-rootfs-relative paths 2016-12-09 14:16:04 -08:00
pools
progress
promise
pubsub
random
reexec
registrar
signal
stdcopy
streamformatter
stringid
stringutils
symlink
sysinfo
system
tailfile
tarsum
term Windows: Fix crash in docker system prune 2016-12-12 13:25:01 -08:00
testutil
tlsconfig
truncindex
urlutil
useragent
README.md

pkg/ is a collection of utility packages used by the Docker project without being specific to its internals.

Utility packages are kept separate from the docker core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the Docker organization, to facilitate re-use by other projects. However that is not the priority.

The directory pkg is named after the same directory in the camlistore project. Since Brad is a core Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!

Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!