From 57c2c819e8c5136c0980565cee8d1307fe142432 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Wed, 8 Jun 2016 02:02:37 -0400 Subject: [PATCH] Move package client/consul/sync to command/agent/consul. This has been done to allow the Server and Client to reuse the same Syncer because the Agent may be running Client, Server, or both simultaneously and we only want one Syncer object alive in the agent. --- client/client.go | 2 +- client/client_test.go | 1 + client/driver/executor/executor.go | 2 +- command/agent/agent.go | 2 +- {client => command/agent}/consul/check.go | 0 {client => command/agent}/consul/sync.go | 0 {client => command/agent}/consul/sync_test.go | 0 7 files changed, 4 insertions(+), 3 deletions(-) rename {client => command/agent}/consul/check.go (100%) rename {client => command/agent}/consul/sync.go (100%) rename {client => command/agent}/consul/sync_test.go (100%) diff --git a/client/client.go b/client/client.go index a99faebe7..3788fdfd1 100644 --- a/client/client.go +++ b/client/client.go @@ -17,11 +17,11 @@ import ( "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/consul" "github.com/hashicorp/nomad/client/driver" "github.com/hashicorp/nomad/client/fingerprint" "github.com/hashicorp/nomad/client/rpcproxy" "github.com/hashicorp/nomad/client/stats" + "github.com/hashicorp/nomad/command/agent/consul" "github.com/hashicorp/nomad/nomad" "github.com/hashicorp/nomad/nomad/structs" "github.com/mitchellh/hashstructure" diff --git a/client/client_test.go b/client/client_test.go index 207b7e585..758d3cb7b 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/nomad/client/config" "github.com/hashicorp/nomad/client/consul" + "github.com/hashicorp/nomad/command/agent/consul" "github.com/hashicorp/nomad/nomad" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" diff --git a/client/driver/executor/executor.go b/client/driver/executor/executor.go index b6b0fcdca..d6901ac95 100644 --- a/client/driver/executor/executor.go +++ b/client/driver/executor/executor.go @@ -21,11 +21,11 @@ import ( "github.com/shirou/gopsutil/process" "github.com/hashicorp/nomad/client/allocdir" - "github.com/hashicorp/nomad/client/consul" "github.com/hashicorp/nomad/client/driver/env" "github.com/hashicorp/nomad/client/driver/logging" cstructs "github.com/hashicorp/nomad/client/driver/structs" "github.com/hashicorp/nomad/client/stats" + "github.com/hashicorp/nomad/command/agent/consul" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" ) diff --git a/command/agent/agent.go b/command/agent/agent.go index 0f7c76d30..1ccf77422 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/nomad/client" clientconfig "github.com/hashicorp/nomad/client/config" - "github.com/hashicorp/nomad/client/consul" + "github.com/hashicorp/nomad/command/agent/consul" "github.com/hashicorp/nomad/nomad" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/consul/check.go b/command/agent/consul/check.go similarity index 100% rename from client/consul/check.go rename to command/agent/consul/check.go diff --git a/client/consul/sync.go b/command/agent/consul/sync.go similarity index 100% rename from client/consul/sync.go rename to command/agent/consul/sync.go diff --git a/client/consul/sync_test.go b/command/agent/consul/sync_test.go similarity index 100% rename from client/consul/sync_test.go rename to command/agent/consul/sync_test.go