diff --git a/vendor/github.com/weaveworks/procspy/LICENSE b/probe/endpoint/procspy/LICENSE similarity index 100% rename from vendor/github.com/weaveworks/procspy/LICENSE rename to probe/endpoint/procspy/LICENSE diff --git a/vendor/github.com/weaveworks/procspy/benchmark_test.go b/probe/endpoint/procspy/benchmark_internal_test.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/benchmark_test.go rename to probe/endpoint/procspy/benchmark_internal_test.go diff --git a/vendor/github.com/weaveworks/procspy/example_test.go b/probe/endpoint/procspy/example_test.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/example_test.go rename to probe/endpoint/procspy/example_test.go diff --git a/vendor/github.com/weaveworks/procspy/fixture.go b/probe/endpoint/procspy/fixture.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/fixture.go rename to probe/endpoint/procspy/fixture.go diff --git a/vendor/github.com/weaveworks/procspy/lsof.go b/probe/endpoint/procspy/lsof.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/lsof.go rename to probe/endpoint/procspy/lsof.go diff --git a/vendor/github.com/weaveworks/procspy/lsof_test.go b/probe/endpoint/procspy/lsof_internal_test.go similarity index 77% rename from vendor/github.com/weaveworks/procspy/lsof_test.go rename to probe/endpoint/procspy/lsof_internal_test.go index 217046229..f716eedd5 100644 --- a/vendor/github.com/weaveworks/procspy/lsof_test.go +++ b/probe/endpoint/procspy/lsof_internal_test.go @@ -12,8 +12,8 @@ func TestLSOFParsing(t *testing.T) { "p25196\n" + "ccello-app\n" + "n127.0.0.1:48094->127.0.0.1:4039\n" + - "n*:4040\n": map[string]Proc{ - "127.0.0.1:48094": Proc{ + "n*:4040\n": { + "127.0.0.1:48094": { PID: 25196, Name: "cello-app", }, @@ -23,7 +23,7 @@ func TestLSOFParsing(t *testing.T) { "cdhclient\n" + "n*:68\n" + "n*:38282\n" + - "n*:40625\n": map[string]Proc{}, + "n*:40625\n": {}, // A bunch "p13100\n" + @@ -39,28 +39,28 @@ func TestLSOFParsing(t *testing.T) { "n192.168.2.111:56385->74.201.105.31:443\n" + "p21356\n" + "cssh\n" + - "n192.168.2.111:33963->192.168.2.71:22\n": map[string]Proc{ - "[::1]:6600": Proc{ + "n192.168.2.111:33963->192.168.2.71:22\n": { + "[::1]:6600": { PID: 13100, Name: "mpd", }, - "[2003:45:2b57:8900:1869:2947:f942:aba7]:55711": Proc{ + "[2003:45:2b57:8900:1869:2947:f942:aba7]:55711": { PID: 14612, Name: "chromium", }, - "192.168.2.111:37158": Proc{ + "192.168.2.111:37158": { PID: 14612, Name: "chromium", }, - "192.168.2.111:44013": Proc{ + "192.168.2.111:44013": { PID: 14612, Name: "chromium", }, - "192.168.2.111:56385": Proc{ + "192.168.2.111:56385": { PID: 14612, Name: "chromium", }, - "192.168.2.111:33963": Proc{ + "192.168.2.111:33963": { PID: 21356, Name: "ssh", }, diff --git a/vendor/github.com/weaveworks/procspy/netstat.go b/probe/endpoint/procspy/netstat.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/netstat.go rename to probe/endpoint/procspy/netstat.go diff --git a/vendor/github.com/weaveworks/procspy/netstat_test.go b/probe/endpoint/procspy/netstat_internal_test.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/netstat_test.go rename to probe/endpoint/procspy/netstat_internal_test.go diff --git a/vendor/github.com/weaveworks/procspy/proc.go b/probe/endpoint/procspy/proc.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/proc.go rename to probe/endpoint/procspy/proc.go diff --git a/vendor/github.com/weaveworks/procspy/procnet.go b/probe/endpoint/procspy/procnet.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/procnet.go rename to probe/endpoint/procspy/procnet.go diff --git a/vendor/github.com/weaveworks/procspy/procnet_test.go b/probe/endpoint/procspy/procnet_internal_test.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/procnet_test.go rename to probe/endpoint/procspy/procnet_internal_test.go diff --git a/vendor/github.com/weaveworks/procspy/spy.go b/probe/endpoint/procspy/spy.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/spy.go rename to probe/endpoint/procspy/spy.go diff --git a/vendor/github.com/weaveworks/procspy/spy_darwin.go b/probe/endpoint/procspy/spy_darwin.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/spy_darwin.go rename to probe/endpoint/procspy/spy_darwin.go diff --git a/vendor/github.com/weaveworks/procspy/spy_linux.go b/probe/endpoint/procspy/spy_linux.go similarity index 100% rename from vendor/github.com/weaveworks/procspy/spy_linux.go rename to probe/endpoint/procspy/spy_linux.go diff --git a/probe/endpoint/reporter.go b/probe/endpoint/reporter.go index 9f8f66ff2..e0083a2d7 100644 --- a/probe/endpoint/reporter.go +++ b/probe/endpoint/reporter.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/procspy" + "github.com/weaveworks/scope/probe/endpoint/procspy" "github.com/weaveworks/scope/probe/process" "github.com/weaveworks/scope/report" ) diff --git a/probe/endpoint/reporter_test.go b/probe/endpoint/reporter_test.go index c7ec41995..9da3e4cac 100644 --- a/probe/endpoint/reporter_test.go +++ b/probe/endpoint/reporter_test.go @@ -5,9 +5,9 @@ import ( "strconv" "testing" - "github.com/weaveworks/procspy" "github.com/weaveworks/scope/probe/docker" "github.com/weaveworks/scope/probe/endpoint" + "github.com/weaveworks/scope/probe/endpoint/procspy" "github.com/weaveworks/scope/report" ) diff --git a/vendor/github.com/weaveworks/procspy/Makefile b/vendor/github.com/weaveworks/procspy/Makefile deleted file mode 100644 index 709dfae80..000000000 --- a/vendor/github.com/weaveworks/procspy/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -.PHONY: all build buildall test install bench -all: test build buildall install - -build: - go build - go vet - golint . - -buildall: - GOOS=darwin go build - GOOS=linux go build - -test: - go test - -install: - go install - -bench: - go test -bench . diff --git a/vendor/github.com/weaveworks/procspy/README.md b/vendor/github.com/weaveworks/procspy/README.md deleted file mode 100644 index 2daf68ffe..000000000 --- a/vendor/github.com/weaveworks/procspy/README.md +++ /dev/null @@ -1,64 +0,0 @@ -Go module to list all TCP connections, with an option to try to find the owning PID and processname. - -Works by reading /proc directly on Linux, and by executing `netstat` and `lsof -i` on Darwin. - -Works for IPv4 and IPv6 TCP connections. Only established connections are listed; ports where something is only listening or TIME_WAITs are skipped. - -If you want to find all processes you'll need to run this as root. - -Status: -------- - -Tested on Linux and Darwin (10.9). - -Install: --------- - -`go install` - -Usage: ------- - -Only list the connections: - -``` -cs, err := procspy.Connections(false) -for c := cs.Next(); c != nil; c = cs.Next() { - ... -} -``` - -List the connections and try to find the owning process: - -``` -cs, err := procspy.Connections(true) -for c := cs.Next(); c != nil; c = cs.Next() { - ... -} -``` - -(See ./example\_test.go) - -``` go - -package main - -import ( - "fmt" - - "github.com/weaveworks/procspy" -) - -func main() { - lookupProcesses := true - cs, err := procspy.Connections(lookupProcesses) - if err != nil { - panic(err) - } - - fmt.Printf("TCP Connections:\n") - for c := cs.Next(); c != nil; c = cs.Next() { - fmt.Printf(" - %v\n", c) - } -} -``` diff --git a/vendor/github.com/weaveworks/procspy/lsproc/lsproc.go b/vendor/github.com/weaveworks/procspy/lsproc/lsproc.go deleted file mode 100644 index d926b463c..000000000 --- a/vendor/github.com/weaveworks/procspy/lsproc/lsproc.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/weaveworks/procspy" -) - -func main() { - cs, err := procspy.Connections(true) - if err != nil { - panic(err) - } - fmt.Printf("TCP Connections:\n") - for c := cs.Next(); c != nil; c = cs.Next() { - fmt.Printf(" - %+v\n", c) - } -} diff --git a/vendor/manifest b/vendor/manifest index f65a6c3dd..21351d08b 100644 --- a/vendor/manifest +++ b/vendor/manifest @@ -723,12 +723,6 @@ "branch": "master", "path": "/odp" }, - { - "importpath": "github.com/weaveworks/procspy", - "repository": "https://github.com/weaveworks/procspy", - "revision": "cb970aa190c374d1e47711dbffb3c2c6e9ef0dd1", - "branch": "master" - }, { "importpath": "github.com/weaveworks/weave/common", "repository": "https://github.com/weaveworks/weave", @@ -931,4 +925,4 @@ "branch": "master" } ] -} \ No newline at end of file +}