open-nomad/helper/pluginutils/loader
Mahmood Ali 2588b3bc98 cleanup driver eventor goroutines
This fixes few cases where driver eventor goroutines are leaked during
normal operations, but especially so in tests.

This change makes few modifications:

First, it switches drivers to use `Context`s to manage shutdown events.
Previously, it relied on callers invoking `.Shutdown()` function that is
specific to internal drivers only and require casting.  Using `Contexts`
provide a consistent idiomatic way to manage lifecycle for both internal
and external drivers.

Also, I discovered few places where we don't clean up a temporary driver
instance in the plugin catalog code, where we dispense a driver to
inspect and validate the schema config without properly cleaning it up.
2020-05-26 11:04:04 -04:00
..
api_versions.go plugin: ensure plugin loader maps correct API version to type. 2020-03-31 12:31:56 +02:00
filter_unix.go move pluginutils -> helper/pluginutils 2019-01-22 15:50:08 -08:00
filter_windows.go Fix executable check on windows 2019-02-08 16:05:14 -05:00
init.go cleanup driver eventor goroutines 2020-05-26 11:04:04 -04:00
instance.go cleanup driver eventor goroutines 2020-05-26 11:04:04 -04:00
loader.go cleanup driver eventor goroutines 2020-05-26 11:04:04 -04:00
loader_test.go move pluginutils -> helper/pluginutils 2019-01-22 15:50:08 -08:00
plugin_test.go cleanup driver eventor goroutines 2020-05-26 11:04:04 -04:00
testing.go move pluginutils -> helper/pluginutils 2019-01-22 15:50:08 -08:00
util.go move pluginutils -> helper/pluginutils 2019-01-22 15:50:08 -08:00