* Rename agent/proxy package to reflect that it is limited to managed proxy processes Rationale: we have several other components of the agent that relate to Connect proxies for example the ProxyConfigManager component needed for Envoy work. Those things are pretty separate from the focus of this package so far which is only concerned with managing external proxy processes so it's nota good fit to put code for that in here, yet there is a naming clash if we have other packages related to proxy functionality that are not in the `agent/proxy` package. Happy to bikeshed the name. I started by calling it `managedproxy` but `managedproxy.Manager` is especially unpleasant. `proxyprocess` seems good in that it's more specific about purpose but less clearly connected with the concept of "managed proxies". The names in use are cleaner though e.g. `proxyprocess.Manager`. This rename was completed automatically using golang.org/x/tools/cmd/gomvpkg. Depends on #4541 * Fix missed windows tagged files
This commit is contained in:
parent
5b0d4db6bc
commit
bed72f6078
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
|
@ -1,6 +1,6 @@
|
|||
// +build !darwin,!linux,!windows
|
||||
|
||||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import "os"
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// +build darwin linux windows
|
||||
|
||||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"os"
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
// Noop implements Proxy and does nothing.
|
||||
type Noop struct{}
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"testing"
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"strings"
|
|
@ -1,6 +1,6 @@
|
|||
// +build !windows
|
||||
|
||||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -1,6 +1,6 @@
|
|||
// +build windows
|
||||
|
||||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"os"
|
|
@ -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"
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"os"
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
import (
|
||||
"encoding/json"
|
|
@ -1,4 +1,4 @@
|
|||
package proxy
|
||||
package proxyprocess
|
||||
|
||||
// defaultTestProxy is the test proxy that is instantiated for proxies with
|
||||
// an execution mode of ProxyExecModeTest.
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue