loader and singleton

This commit is contained in:
Alex Dadgar 2019-01-14 16:50:05 -08:00 committed by Michael Schurter
parent 6c2782f037
commit cdcd3c929c
35 changed files with 31 additions and 31 deletions

View File

@ -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"
)

View File

@ -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 (

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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 (

View File

@ -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

View File

@ -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"

View File

@ -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 {

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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.

View File

@ -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 (

View File

@ -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"

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"

View File

@ -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"
)

View File

@ -5,7 +5,7 @@ package catalog
import (
"sync"
"github.com/hashicorp/nomad/plugins/shared/loader"
"github.com/hashicorp/nomad/pluginutils/loader"
)
var (

View File

@ -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"
)

View File

@ -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

View File

@ -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 (

View File

@ -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"
)