mirror of https://github.com/k3s-io/k3s
![]() 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. |
||
---|---|---|
.. | ||
cache | ||
format | ||
ioutils | ||
manager | ||
pluginwatcher | ||
queue | ||
sliceutils | ||
store | ||
BUILD | ||
doc.go | ||
util.go | ||
util_test.go | ||
util_unix.go | ||
util_unsupported.go | ||
util_windows.go |