diff --git a/agent/agent.go b/agent/agent.go index ab5c605f6d..cec9612993 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -27,7 +27,7 @@ import ( "github.com/hashicorp/consul/agent/config" "github.com/hashicorp/consul/agent/consul" "github.com/hashicorp/consul/agent/local" - "github.com/hashicorp/consul/agent/proxy" + "github.com/hashicorp/consul/agent/proxyprocess" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/agent/systemd" "github.com/hashicorp/consul/agent/token" @@ -211,7 +211,7 @@ type Agent struct { tokens *token.Store // proxyManager is the proxy process manager for managed Connect proxies. - proxyManager *proxy.Manager + proxyManager *proxyprocess.Manager // proxyLock protects proxy information in the local state from concurrent modification proxyLock sync.Mutex @@ -282,7 +282,7 @@ func (a *Agent) setupProxyManager() error { if err != nil { return fmt.Errorf("[INFO] agent: Connect managed proxies are disabled due to providing an invalid HTTP configuration") } - a.proxyManager = proxy.NewManager() + a.proxyManager = proxyprocess.NewManager() a.proxyManager.AllowRoot = a.config.ConnectProxyAllowManagedRoot a.proxyManager.State = a.State a.proxyManager.Logger = a.logger diff --git a/agent/proxy/daemon.go b/agent/proxyprocess/daemon.go similarity index 99% rename from agent/proxy/daemon.go rename to agent/proxyprocess/daemon.go index 8b37ffb197..8887bbaeb0 100644 --- a/agent/proxy/daemon.go +++ b/agent/proxyprocess/daemon.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess import ( "fmt" diff --git a/agent/proxy/daemon_test.go b/agent/proxyprocess/daemon_test.go similarity index 99% rename from agent/proxy/daemon_test.go rename to agent/proxyprocess/daemon_test.go index 80fb9b533e..0fbfb2f127 100644 --- a/agent/proxy/daemon_test.go +++ b/agent/proxyprocess/daemon_test.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess import ( "io/ioutil" diff --git a/agent/proxy/exitstatus_other.go b/agent/proxyprocess/exitstatus_other.go similarity index 90% rename from agent/proxy/exitstatus_other.go rename to agent/proxyprocess/exitstatus_other.go index 84dd88867d..b5e4422df4 100644 --- a/agent/proxy/exitstatus_other.go +++ b/agent/proxyprocess/exitstatus_other.go @@ -1,6 +1,6 @@ // +build !darwin,!linux,!windows -package proxy +package proxyprocess import "os" diff --git a/agent/proxy/exitstatus_syscall.go b/agent/proxyprocess/exitstatus_syscall.go similarity index 94% rename from agent/proxy/exitstatus_syscall.go rename to agent/proxyprocess/exitstatus_syscall.go index 1caeda4bf1..65492e3cc3 100644 --- a/agent/proxy/exitstatus_syscall.go +++ b/agent/proxyprocess/exitstatus_syscall.go @@ -1,6 +1,6 @@ // +build darwin linux windows -package proxy +package proxyprocess import ( "os" diff --git a/agent/proxy/manager.go b/agent/proxyprocess/manager.go similarity index 99% rename from agent/proxy/manager.go rename to agent/proxyprocess/manager.go index d0b59fb0b5..a4470b7f26 100644 --- a/agent/proxy/manager.go +++ b/agent/proxyprocess/manager.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess import ( "fmt" diff --git a/agent/proxy/manager_test.go b/agent/proxyprocess/manager_test.go similarity index 99% rename from agent/proxy/manager_test.go rename to agent/proxyprocess/manager_test.go index c1d2f66a0c..2737b85fb7 100644 --- a/agent/proxy/manager_test.go +++ b/agent/proxyprocess/manager_test.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess import ( "io/ioutil" diff --git a/agent/proxy/noop.go b/agent/proxyprocess/noop.go similarity index 96% rename from agent/proxy/noop.go rename to agent/proxyprocess/noop.go index 62599f8956..219eec719e 100644 --- a/agent/proxy/noop.go +++ b/agent/proxyprocess/noop.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess // Noop implements Proxy and does nothing. type Noop struct{} diff --git a/agent/proxy/noop_test.go b/agent/proxyprocess/noop_test.go similarity index 80% rename from agent/proxy/noop_test.go rename to agent/proxyprocess/noop_test.go index 77513ad29f..5833b6a606 100644 --- a/agent/proxy/noop_test.go +++ b/agent/proxyprocess/noop_test.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess import ( "testing" diff --git a/agent/proxy/process.go b/agent/proxyprocess/process.go similarity index 95% rename from agent/proxy/process.go rename to agent/proxyprocess/process.go index d299941fde..f9bb10bbe9 100644 --- a/agent/proxy/process.go +++ b/agent/proxyprocess/process.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess import ( "strings" diff --git a/agent/proxy/process_unix.go b/agent/proxyprocess/process_unix.go similarity index 98% rename from agent/proxy/process_unix.go rename to agent/proxyprocess/process_unix.go index 665b0d09e5..08618f0400 100644 --- a/agent/proxy/process_unix.go +++ b/agent/proxyprocess/process_unix.go @@ -1,6 +1,6 @@ // +build !windows -package proxy +package proxyprocess import ( "fmt" diff --git a/agent/proxy/process_windows.go b/agent/proxyprocess/process_windows.go similarity index 94% rename from agent/proxy/process_windows.go rename to agent/proxyprocess/process_windows.go index 99e2248d50..8f7bca23f2 100644 --- a/agent/proxy/process_windows.go +++ b/agent/proxyprocess/process_windows.go @@ -1,6 +1,6 @@ // +build windows -package proxy +package proxyprocess import ( "os" diff --git a/agent/proxy/proxy.go b/agent/proxyprocess/proxy.go similarity index 99% rename from agent/proxy/proxy.go rename to agent/proxyprocess/proxy.go index 91f44dc998..e2ef7fe47a 100644 --- a/agent/proxy/proxy.go +++ b/agent/proxyprocess/proxy.go @@ -5,7 +5,7 @@ // // This package does not contain the built-in proxy for Connect. The source // for that is available in the "connect/proxy" package. -package proxy +package proxyprocess import ( "github.com/hashicorp/consul/agent/structs" diff --git a/agent/proxy/proxy_test.go b/agent/proxyprocess/proxy_test.go similarity index 99% rename from agent/proxy/proxy_test.go rename to agent/proxyprocess/proxy_test.go index 0ac0446a8f..9db343680b 100644 --- a/agent/proxy/proxy_test.go +++ b/agent/proxyprocess/proxy_test.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess import ( "fmt" diff --git a/agent/proxy/root.go b/agent/proxyprocess/root.go similarity index 95% rename from agent/proxy/root.go rename to agent/proxyprocess/root.go index 3be5904ae3..3e987131df 100644 --- a/agent/proxy/root.go +++ b/agent/proxyprocess/root.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess import ( "os" diff --git a/agent/proxy/snapshot.go b/agent/proxyprocess/snapshot.go similarity index 99% rename from agent/proxy/snapshot.go rename to agent/proxyprocess/snapshot.go index dbe03fd83d..05f07cc447 100644 --- a/agent/proxy/snapshot.go +++ b/agent/proxyprocess/snapshot.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess import ( "encoding/json" diff --git a/agent/proxy/test.go b/agent/proxyprocess/test.go similarity index 95% rename from agent/proxy/test.go rename to agent/proxyprocess/test.go index b6b35bb04b..69de7a6da3 100644 --- a/agent/proxy/test.go +++ b/agent/proxyprocess/test.go @@ -1,4 +1,4 @@ -package proxy +package proxyprocess // defaultTestProxy is the test proxy that is instantiated for proxies with // an execution mode of ProxyExecModeTest. diff --git a/command/connect/proxy/proxy.go b/command/connect/proxy/proxy.go index 48ea721d55..987d0aa3a6 100644 --- a/command/connect/proxy/proxy.go +++ b/command/connect/proxy/proxy.go @@ -12,7 +12,7 @@ import ( "sort" "strconv" - proxyAgent "github.com/hashicorp/consul/agent/proxy" + proxyAgent "github.com/hashicorp/consul/agent/proxyprocess" "github.com/hashicorp/consul/api" "github.com/hashicorp/consul/command/flags" proxyImpl "github.com/hashicorp/consul/connect/proxy"