diff --git a/client/config/config.go b/client/config/config.go index eb8408e78..7ec223030 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" "github.com/hashicorp/nomad/plugins/base" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" "github.com/hashicorp/nomad/version" ) diff --git a/client/devicemanager/instance.go b/client/devicemanager/instance.go index 0837abf10..532d3e2a8 100644 --- a/client/devicemanager/instance.go +++ b/client/devicemanager/instance.go @@ -12,8 +12,8 @@ import ( "github.com/hashicorp/nomad/plugins/base" bstructs "github.com/hashicorp/nomad/plugins/base/structs" "github.com/hashicorp/nomad/plugins/device" - "github.com/hashicorp/nomad/plugins/shared/loader" - "github.com/hashicorp/nomad/plugins/shared/singleton" + "github.com/hashicorp/nomad/pluginutils/loader" + "github.com/hashicorp/nomad/pluginutils/singleton" ) const ( diff --git a/client/devicemanager/manager.go b/client/devicemanager/manager.go index 86bc0eca3..0fc2099c3 100644 --- a/client/devicemanager/manager.go +++ b/client/devicemanager/manager.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/device" "github.com/hashicorp/nomad/plugins/shared" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" ) // Manager is the interface used to manage device plugins diff --git a/client/devicemanager/manager_test.go b/client/devicemanager/manager_test.go index ac82be354..5ae8eea7f 100644 --- a/client/devicemanager/manager_test.go +++ b/client/devicemanager/manager_test.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/device" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" psstructs "github.com/hashicorp/nomad/plugins/shared/structs" "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/require" diff --git a/client/fingerprint_manager.go b/client/fingerprint_manager.go index 03a2b3ca9..58e76262b 100644 --- a/client/fingerprint_manager.go +++ b/client/fingerprint_manager.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/nomad/client/config" "github.com/hashicorp/nomad/client/fingerprint" "github.com/hashicorp/nomad/nomad/structs" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" ) // FingerprintManager runs a client fingerprinters on a continuous basis, and diff --git a/client/pluginmanager/drivermanager/instance.go b/client/pluginmanager/drivermanager/instance.go index 59a8541c3..f0c0b08e5 100644 --- a/client/pluginmanager/drivermanager/instance.go +++ b/client/pluginmanager/drivermanager/instance.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/nomad/plugins/base" bstructs "github.com/hashicorp/nomad/plugins/base/structs" "github.com/hashicorp/nomad/plugins/drivers" - "github.com/hashicorp/nomad/plugins/shared/loader" - "github.com/hashicorp/nomad/plugins/shared/singleton" + "github.com/hashicorp/nomad/pluginutils/loader" + "github.com/hashicorp/nomad/pluginutils/singleton" ) const ( diff --git a/client/pluginmanager/drivermanager/manager.go b/client/pluginmanager/drivermanager/manager.go index 9c8c6af80..486231f29 100644 --- a/client/pluginmanager/drivermanager/manager.go +++ b/client/pluginmanager/drivermanager/manager.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/drivers" "github.com/hashicorp/nomad/plugins/shared" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" ) // ErrDriverNotFound is returned during Dispense when the requested driver diff --git a/client/pluginmanager/drivermanager/manager_test.go b/client/pluginmanager/drivermanager/manager_test.go index 3e8de7014..af88fbc7e 100644 --- a/client/pluginmanager/drivermanager/manager_test.go +++ b/client/pluginmanager/drivermanager/manager_test.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/drivers" dtu "github.com/hashicorp/nomad/plugins/drivers/testutils" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/client/pluginmanager/drivermanager/testing.go b/client/pluginmanager/drivermanager/testing.go index 35172b7cf..03b372130 100644 --- a/client/pluginmanager/drivermanager/testing.go +++ b/client/pluginmanager/drivermanager/testing.go @@ -11,8 +11,8 @@ import ( "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/drivers" "github.com/hashicorp/nomad/pluginutils/catalog" - "github.com/hashicorp/nomad/plugins/shared/loader" - "github.com/hashicorp/nomad/plugins/shared/singleton" + "github.com/hashicorp/nomad/pluginutils/loader" + "github.com/hashicorp/nomad/pluginutils/singleton" ) type testManager struct { diff --git a/client/testing.go b/client/testing.go index 4a1d70d55..0b48ec646 100644 --- a/client/testing.go +++ b/client/testing.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/nomad/command/agent/consul" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/pluginutils/catalog" - "github.com/hashicorp/nomad/plugins/shared/singleton" + "github.com/hashicorp/nomad/pluginutils/singleton" testing "github.com/mitchellh/go-testing-interface" ) diff --git a/command/agent/agent.go b/command/agent/agent.go index 34588c341..095b38848 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -27,7 +27,7 @@ import ( "github.com/hashicorp/nomad/nomad" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" "github.com/hashicorp/raft" ) diff --git a/command/agent/plugins.go b/command/agent/plugins.go index 1fb7c640e..a7339de5a 100644 --- a/command/agent/plugins.go +++ b/command/agent/plugins.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/hashicorp/nomad/pluginutils/catalog" - "github.com/hashicorp/nomad/plugins/shared/loader" - "github.com/hashicorp/nomad/plugins/shared/singleton" + "github.com/hashicorp/nomad/pluginutils/loader" + "github.com/hashicorp/nomad/pluginutils/singleton" ) // setupPlugins is used to setup the plugin loaders. diff --git a/drivers/docker/config.go b/drivers/docker/config.go index 0398137e0..6447b6aac 100644 --- a/drivers/docker/config.go +++ b/drivers/docker/config.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/drivers" "github.com/hashicorp/nomad/plugins/shared/hclspec" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" ) const ( diff --git a/drivers/docker/driver_test.go b/drivers/docker/driver_test.go index 47c0cfc70..330e2c3f6 100644 --- a/drivers/docker/driver_test.go +++ b/drivers/docker/driver_test.go @@ -25,7 +25,7 @@ import ( "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/drivers" dtestutil "github.com/hashicorp/nomad/plugins/drivers/testutils" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" tu "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/drivers/exec/driver.go b/drivers/exec/driver.go index 91e3f548b..c27375c93 100644 --- a/drivers/exec/driver.go +++ b/drivers/exec/driver.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/nomad/plugins/drivers/utils" "github.com/hashicorp/nomad/plugins/shared" "github.com/hashicorp/nomad/plugins/shared/hclspec" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" pstructs "github.com/hashicorp/nomad/plugins/shared/structs" ) diff --git a/drivers/java/driver.go b/drivers/java/driver.go index 433539e9d..81c6b2814 100644 --- a/drivers/java/driver.go +++ b/drivers/java/driver.go @@ -20,7 +20,7 @@ import ( "github.com/hashicorp/nomad/plugins/drivers/utils" "github.com/hashicorp/nomad/plugins/shared" "github.com/hashicorp/nomad/plugins/shared/hclspec" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" pstructs "github.com/hashicorp/nomad/plugins/shared/structs" ) diff --git a/drivers/mock/driver.go b/drivers/mock/driver.go index f80b81514..45a87ec67 100644 --- a/drivers/mock/driver.go +++ b/drivers/mock/driver.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/drivers" "github.com/hashicorp/nomad/plugins/shared/hclspec" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" pstructs "github.com/hashicorp/nomad/plugins/shared/structs" ) diff --git a/drivers/qemu/driver.go b/drivers/qemu/driver.go index 7d2420400..a6044212b 100644 --- a/drivers/qemu/driver.go +++ b/drivers/qemu/driver.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/nomad/plugins/drivers" "github.com/hashicorp/nomad/plugins/shared" "github.com/hashicorp/nomad/plugins/shared/hclspec" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" pstructs "github.com/hashicorp/nomad/plugins/shared/structs" ) diff --git a/drivers/rawexec/driver.go b/drivers/rawexec/driver.go index 9a3aec507..1d386e962 100644 --- a/drivers/rawexec/driver.go +++ b/drivers/rawexec/driver.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/nomad/plugins/drivers" "github.com/hashicorp/nomad/plugins/shared" "github.com/hashicorp/nomad/plugins/shared/hclspec" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" pstructs "github.com/hashicorp/nomad/plugins/shared/structs" ) diff --git a/drivers/rkt/driver.go b/drivers/rkt/driver.go index e6c1a2225..20eece4ed 100644 --- a/drivers/rkt/driver.go +++ b/drivers/rkt/driver.go @@ -33,7 +33,7 @@ import ( "github.com/hashicorp/nomad/plugins/drivers" "github.com/hashicorp/nomad/plugins/shared" "github.com/hashicorp/nomad/plugins/shared/hclspec" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" pstructs "github.com/hashicorp/nomad/plugins/shared/structs" rktv1 "github.com/rkt/rkt/api/v1" ) diff --git a/nomad/config.go b/nomad/config.go index d67241757..929ba2948 100644 --- a/nomad/config.go +++ b/nomad/config.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" "github.com/hashicorp/nomad/scheduler" "github.com/hashicorp/raft" "github.com/hashicorp/serf/serf" diff --git a/nomad/testing.go b/nomad/testing.go index b62166745..795f7725e 100644 --- a/nomad/testing.go +++ b/nomad/testing.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/pluginutils/catalog" - "github.com/hashicorp/nomad/plugins/shared/singleton" + "github.com/hashicorp/nomad/pluginutils/singleton" "github.com/mitchellh/go-testing-interface" ) diff --git a/pluginutils/catalog/catalog.go b/pluginutils/catalog/catalog.go index 36bb7c6c0..c86f94113 100644 --- a/pluginutils/catalog/catalog.go +++ b/pluginutils/catalog/catalog.go @@ -5,7 +5,7 @@ package catalog import ( "sync" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" ) var ( diff --git a/pluginutils/catalog/testing.go b/pluginutils/catalog/testing.go index 19ed78bb2..95332ca92 100644 --- a/pluginutils/catalog/testing.go +++ b/pluginutils/catalog/testing.go @@ -3,7 +3,7 @@ package catalog import ( "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/nomad/structs/config" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" "github.com/mitchellh/go-testing-interface" ) diff --git a/plugins/shared/loader/api_versions.go b/pluginutils/loader/api_versions.go similarity index 100% rename from plugins/shared/loader/api_versions.go rename to pluginutils/loader/api_versions.go diff --git a/plugins/shared/loader/init.go b/pluginutils/loader/init.go similarity index 100% rename from plugins/shared/loader/init.go rename to pluginutils/loader/init.go diff --git a/plugins/shared/loader/instance.go b/pluginutils/loader/instance.go similarity index 100% rename from plugins/shared/loader/instance.go rename to pluginutils/loader/instance.go diff --git a/plugins/shared/loader/loader.go b/pluginutils/loader/loader.go similarity index 100% rename from plugins/shared/loader/loader.go rename to pluginutils/loader/loader.go diff --git a/plugins/shared/loader/loader_test.go b/pluginutils/loader/loader_test.go similarity index 100% rename from plugins/shared/loader/loader_test.go rename to pluginutils/loader/loader_test.go diff --git a/plugins/shared/loader/plugin_test.go b/pluginutils/loader/plugin_test.go similarity index 100% rename from plugins/shared/loader/plugin_test.go rename to pluginutils/loader/plugin_test.go diff --git a/plugins/shared/loader/testing.go b/pluginutils/loader/testing.go similarity index 100% rename from plugins/shared/loader/testing.go rename to pluginutils/loader/testing.go diff --git a/plugins/shared/loader/util.go b/pluginutils/loader/util.go similarity index 100% rename from plugins/shared/loader/util.go rename to pluginutils/loader/util.go diff --git a/plugins/shared/singleton/future.go b/pluginutils/singleton/future.go similarity index 95% rename from plugins/shared/singleton/future.go rename to pluginutils/singleton/future.go index 10b8a7b65..3b55bc358 100644 --- a/plugins/shared/singleton/future.go +++ b/pluginutils/singleton/future.go @@ -2,7 +2,7 @@ package singleton import ( "github.com/hashicorp/nomad/helper/uuid" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" ) // future is a sharable future for retrieving a plugin instance or any error diff --git a/plugins/shared/singleton/singleton.go b/pluginutils/singleton/singleton.go similarity index 98% rename from plugins/shared/singleton/singleton.go rename to pluginutils/singleton/singleton.go index 260b092c5..4145d0869 100644 --- a/plugins/shared/singleton/singleton.go +++ b/pluginutils/singleton/singleton.go @@ -7,7 +7,7 @@ import ( log "github.com/hashicorp/go-hclog" plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/plugins/base" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" ) var ( diff --git a/plugins/shared/singleton/singleton_test.go b/pluginutils/singleton/singleton_test.go similarity index 99% rename from plugins/shared/singleton/singleton_test.go rename to pluginutils/singleton/singleton_test.go index e1f122513..57e69b19c 100644 --- a/plugins/shared/singleton/singleton_test.go +++ b/pluginutils/singleton/singleton_test.go @@ -10,7 +10,7 @@ import ( plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/plugins/base" - "github.com/hashicorp/nomad/plugins/shared/loader" + "github.com/hashicorp/nomad/pluginutils/loader" "github.com/stretchr/testify/require" )