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 Windows: Use sequential file access 2016-11-16 11:05:23 -08:00
authorization Rename Remote API to Engine API 2016-11-22 16:49:58 -08:00
broadcaster
chrootarchive Merge pull request #28047 from cpuguy83/27773_chrootarchive_rbind 2016-11-09 10:52:14 -08:00
devicemapper fix a few golint errors 2016-11-19 23:50:06 -08:00
directory Fix filepath.Walk misusage in pkg/directory 2016-05-30 07:40:46 +00:00
discovery fix typo 2016-11-18 13:27:01 -08:00
filenotify project: use vndr for vendoring 2016-11-03 15:31:46 -07:00
fileutils all: use strings.Contains instead Index 2016-10-13 15:55:41 -07:00
fsutils overlay: warn if overlay backing fs doesn't support d_type 2016-11-09 07:18:27 +00:00
gitutils Fix gitconfig dependency in pkg/gitutils.TestCheckoutGit 2016-06-02 17:44:09 +09:00
graphdb Windows: Factor out sqlite 2016-12-02 13:40:06 -08:00
homedir
httputils fix typos 2016-06-02 17:17:22 +08:00
idtools Remove use of pkg/integration in pkg/idtools 2016-11-08 17:21:02 +01:00
integration Remove use of pkg/integration in pkg/idtools 2016-11-08 17:21:02 +01:00
ioutils s/bCap/bLen/ 2016-11-18 13:31:39 -08:00
jsonlog Add support for reading logs extra attrs 2016-05-06 20:42:20 -04:00
jsonmessage pkg/jsonmessage: Avoid undefined ANSI escape codes. 2016-11-10 14:10:47 +00:00
listeners Get the Docker Engine to build clean on Solaris 2016-05-23 16:37:12 -07:00
locker
longpath
loopback Fix logrus formatting 2016-06-11 13:16:55 -07:00
mount Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
namesgenerator Add some adjectives to the namesgenerator 2016-11-30 14:07:37 -08:00
parsers Fix TestUpdateKernelMemoryUninitialized on new kernel version 2016-08-02 13:17:20 +08:00
pidfile mkdirall on the PID file path 2016-10-25 09:11:20 -07:00
platform Swap usage of LazyDLL and LoadDLL to LazySystemDLL. 2016-11-22 18:40:35 -08:00
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 pkg/pool: no need for double pointer for sync.Pool 2016-10-20 15:27:38 -07:00
progress progress: Rate limit progress bar output 2016-09-14 17:23:16 -07:00
promise
pubsub
random
reexec make more pkgs support darwin 2016-08-10 22:56:05 +08:00
registrar fix typos in pkg 2016-04-09 21:18:15 +08:00
signal Move stack dump dir to exec root 2016-11-30 14:02:24 -08:00
stdcopy stdcopy: remove logrus debug messages; makes it easier to vendor without the dependency. 2016-10-26 16:29:37 -07:00
streamformatter Fix pkg/streamformatter.TestJSONFormatProgress 2016-05-31 09:09:06 +00:00
stringid Minor refactor and beter coverage for pkg/stringid 2016-07-20 00:23:06 +02:00
stringutils Implement stringutils.Ellipsis() 2016-08-11 14:14:06 +02:00
symlink Don't attempt to evaluate drive root on Windows 2016-09-08 13:52:54 -07:00
sysinfo Swap usage of LazyDLL and LoadDLL to LazySystemDLL. 2016-11-22 18:40:35 -08:00
system Swap usage of LazyDLL and LoadDLL to LazySystemDLL. 2016-11-22 18:40:35 -08:00
tailfile Change reading order of tailfile 2016-11-14 11:58:01 -08:00
tarsum add defer file.Close to avoid potential fd leak 2016-08-10 08:36:09 +08:00
term Windows: Fix crash in docker system prune 2016-12-12 13:25:01 -08:00
testutil Fix broken JSON support in cli/command/formatter 2016-10-17 08:07:17 +00:00
tlsconfig Use system ca pool from tlsconfig 2016-10-31 14:52:07 -07:00
truncindex pkg: truncindex: provide more info in error 2016-03-17 15:53:12 +01:00
urlutil Support unixgram syslog address 2016-04-28 11:04:50 +08:00
useragent
README.md

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!