k3s/pkg/kubelet/util
hui luo d04f596829 Add hierarchy support for plugin directory
it traverses and watch plugin directory and its sub directory recursively,
plugin socket file only need be unique within one directory,

- plugin socket directory
-    |
-    ---->sub directory 1
-    |              |
-    |              ----->  socket1,  socket2 ...
-    ----->sub directory 2
-                  |
-                  ------> socket1, socket2 ...

the design itself allow sub directory be anything,
but in practical, each plugin type could just use one sub directory.

four bonus changes added as below

1. extract example handler out from test, it is easier to read the code
with the seperation.

2. there are two variables here: "Watcher" and "watcher".
"Watcher" is the plugin watcher, and "watcher" is the fsnotify watcher.
so rename the "watcher" to "fsWatcher" to make code easier to
understand.

3. change RegisterCallbackFn() return value order, it is
conventional to return error last, after this change,
the pkg/volume/csi is compliance with golint, so remove it
from hack/.golint_failures

4. refactor errors handling at invokeRegistrationCallbackAtHandler()
to make error message more clear.
2018-06-25 17:32:18 -07:00
..
cache Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
format Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
ioutils
manager Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
pluginwatcher Add hierarchy support for plugin directory 2018-06-25 17:32:18 -07:00
queue Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
sliceutils Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
store
BUILD Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
doc.go
util.go Detect backsteps correctly in base path detection 2018-03-13 02:23:06 -04:00
util_test.go
util_unix.go
util_unsupported.go Lock subPath volumes 2018-03-05 09:14:44 +01:00
util_windows.go