Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename agent/proxy package to reflect that it is limited to managed proxy processes. #4550

Merged
merged 2 commits into from
Aug 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -210,7 +210,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
Expand Down Expand Up @@ -372,7 +372,7 @@ func (a *Agent) Start() error {
// done here after the local state above is loaded in so we can have
// a more accurate initial state view.
if !c.ConnectTestDisableManagedProxies {
a.proxyManager = proxy.NewManager()
a.proxyManager = proxyprocess.NewManager()
a.proxyManager.AllowRoot = a.config.ConnectProxyAllowManagedRoot
a.proxyManager.State = a.State
a.proxyManager.Logger = a.logger
Expand Down
2 changes: 1 addition & 1 deletion agent/proxy/daemon.go → agent/proxyprocess/daemon.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

import (
"io/ioutil"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// +build !darwin,!linux,!windows

package proxy
package proxyprocess

import "os"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// +build darwin linux windows

package proxy
package proxyprocess

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion agent/proxy/manager.go → agent/proxyprocess/manager.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

import (
"io/ioutil"
Expand Down
2 changes: 1 addition & 1 deletion agent/proxy/noop.go → agent/proxyprocess/noop.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

// Noop implements Proxy and does nothing.
type Noop struct{}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion agent/proxy/process.go → agent/proxyprocess/process.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

import (
"strings"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// +build !windows

package proxy
package proxyprocess

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// +build windows

package proxy
package proxyprocess

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion agent/proxy/proxy.go → agent/proxyprocess/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion agent/proxy/root.go → agent/proxyprocess/root.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion agent/proxy/snapshot.go → agent/proxyprocess/snapshot.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion agent/proxy/test.go → agent/proxyprocess/test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package proxy
package proxyprocess

// defaultTestProxy is the test proxy that is instantiated for proxies with
// an execution mode of ProxyExecModeTest.
Expand Down
2 changes: 1 addition & 1 deletion command/connect/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down