veyron: start the transition to using ListenX.
Change-Id: I2c7a9a7495367a89d25b0611357416309bfe9e17
diff --git a/services/identity/identityd/main.go b/services/identity/identityd/main.go
index d9a9cba..2218046 100644
--- a/services/identity/identityd/main.go
+++ b/services/identity/identityd/main.go
@@ -11,6 +11,13 @@
"strings"
"time"
+ "veyron.io/veyron/veyron2"
+ "veyron.io/veyron/veyron2/ipc"
+ "veyron.io/veyron/veyron2/naming"
+ "veyron.io/veyron/veyron2/rt"
+ "veyron.io/veyron/veyron2/security"
+ "veyron.io/veyron/veyron2/vlog"
+
"veyron.io/veyron/veyron/lib/signals"
vsecurity "veyron.io/veyron/veyron/security"
"veyron.io/veyron/veyron/security/audit"
@@ -21,13 +28,6 @@
"veyron.io/veyron/veyron/services/identity/revocation"
services "veyron.io/veyron/veyron/services/security"
"veyron.io/veyron/veyron/services/security/discharger"
-
- "veyron.io/veyron/veyron2"
- "veyron.io/veyron/veyron2/ipc"
- "veyron.io/veyron/veyron2/naming"
- "veyron.io/veyron/veyron2/rt"
- "veyron.io/veyron/veyron2/security"
- "veyron.io/veyron/veyron2/vlog"
)
var (
diff --git a/services/mgmt/application/applicationd/main.go b/services/mgmt/application/applicationd/main.go
index 0928668..5288fd6 100644
--- a/services/mgmt/application/applicationd/main.go
+++ b/services/mgmt/application/applicationd/main.go
@@ -3,20 +3,16 @@
import (
"flag"
- "veyron.io/veyron/veyron/lib/signals"
- vflag "veyron.io/veyron/veyron/security/flag"
- "veyron.io/veyron/veyron/services/mgmt/application/impl"
-
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/vlog"
+
+ "veyron.io/veyron/veyron/lib/signals"
+ "veyron.io/veyron/veyron/profiles/roaming"
+ vflag "veyron.io/veyron/veyron/security/flag"
+ "veyron.io/veyron/veyron/services/mgmt/application/impl"
)
var (
- // TODO(rthellend): Remove the protocol and address flags when the config
- // manager is working.
- protocol = flag.String("protocol", "tcp", "protocol to listen on")
- address = flag.String("address", ":0", "address to listen on")
-
name = flag.String("name", "", "name to mount the application repository as")
store = flag.String("store", "", "local directory to store application envelopes in")
)
@@ -39,9 +35,9 @@
vlog.Fatalf("NewDispatcher() failed: %v", err)
}
- endpoint, err := server.Listen(*protocol, *address)
+ endpoint, err := server.ListenX(roaming.ListenSpec)
if err != nil {
- vlog.Fatalf("Listen(%v, %v) failed: %v", *protocol, *address, err)
+ vlog.Fatalf("Listen(%s) failed: %v", roaming.ListenSpec, err)
}
if err := server.Serve(*name, dispatcher); err != nil {
vlog.Fatalf("Serve(%v) failed: %v", *name, err)
diff --git a/services/mgmt/application/applicationd/test.sh b/services/mgmt/application/applicationd/test.sh
index b6173f2..427efed 100755
--- a/services/mgmt/application/applicationd/test.sh
+++ b/services/mgmt/application/applicationd/test.sh
@@ -22,7 +22,7 @@
# Start the application repository daemon.
local -r REPO="applicationd-test-repo"
local -r STORE=$(shell::tmp_dir)
- shell_test::start_server ./applicationd --name="${REPO}" --store="${STORE}" --address=127.0.0.1:0 -logtostderr
+ shell_test::start_server ./applicationd --name="${REPO}" --store="${STORE}" --veyron.tcp.address=127.0.0.1:0
# Create an application envelope.
local -r APPLICATION="${REPO}/test-application/v1"
diff --git a/services/mgmt/application/impl/impl_test.go b/services/mgmt/application/impl/impl_test.go
index 5a9f331..3f18ccd 100644
--- a/services/mgmt/application/impl/impl_test.go
+++ b/services/mgmt/application/impl/impl_test.go
@@ -5,11 +5,12 @@
"reflect"
"testing"
- "veyron.io/veyron/veyron/services/mgmt/repository"
-
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/services/mgmt/application"
+
+ "veyron.io/veyron/veyron/profiles"
+ "veyron.io/veyron/veyron/services/mgmt/repository"
)
// TestInterface tests that the implementation correctly implements
@@ -40,10 +41,9 @@
t.Fatalf("NewDispatcher() failed: %v", err)
}
- protocol, hostname := "tcp", "127.0.0.1:0"
- endpoint, err := server.Listen(protocol, hostname)
+ endpoint, err := server.ListenX(profiles.LocalListenSpec)
if err != nil {
- t.Fatalf("Listen(%v, %v) failed: %v", protocol, hostname, err)
+ t.Fatalf("Listen(%s) failed: %v", profiles.LocalListenSpec, err)
}
if err := server.Serve("", dispatcher); err != nil {
t.Fatalf("Serve(%v) failed: %v", dispatcher, err)
diff --git a/services/mgmt/binary/binaryd/main.go b/services/mgmt/binary/binaryd/main.go
index c5e5f51..6b2ed31 100644
--- a/services/mgmt/binary/binaryd/main.go
+++ b/services/mgmt/binary/binaryd/main.go
@@ -6,13 +6,13 @@
"os"
"path/filepath"
- "veyron.io/veyron/veyron/lib/signals"
- vflag "veyron.io/veyron/veyron/security/flag"
-
- "veyron.io/veyron/veyron/services/mgmt/binary/impl"
-
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/vlog"
+
+ "veyron.io/veyron/veyron/lib/signals"
+ "veyron.io/veyron/veyron/profiles/roaming"
+ vflag "veyron.io/veyron/veyron/security/flag"
+ "veyron.io/veyron/veyron/services/mgmt/binary/impl"
)
const (
@@ -21,11 +21,6 @@
)
var (
- // TODO(rthellend): Remove the protocol and address flags when the config
- // manager is working.
- protocol = flag.String("protocol", "tcp", "protocol to listen on")
- address = flag.String("address", ":0", "address to listen on")
-
name = flag.String("name", "", "name to mount the binary repository as")
root = flag.String("root", "", "root directory for the binary repository")
)
@@ -78,9 +73,9 @@
vlog.Errorf("NewDispatcher(%v, %v, %v) failed: %v", *root, defaultDepth, auth, err)
return
}
- endpoint, err := server.Listen(*protocol, *address)
+ endpoint, err := server.ListenX(roaming.ListenSpec)
if err != nil {
- vlog.Errorf("Listen(%v, %v) failed: %v", *protocol, *address, err)
+ vlog.Errorf("Listen(%s) failed: %v", roaming.ListenSpec, err)
return
}
if err := server.Serve(*name, dispatcher); err != nil {
diff --git a/services/mgmt/binary/binaryd/test.sh b/services/mgmt/binary/binaryd/test.sh
index c78a028..357961c 100755
--- a/services/mgmt/binary/binaryd/test.sh
+++ b/services/mgmt/binary/binaryd/test.sh
@@ -21,7 +21,9 @@
# Start the binary repository daemon.
local -r REPO="binaryd-test-repo"
- shell_test::start_server ./binaryd --name="${REPO}" --address=127.0.0.1:0
+ shell_test::start_server ./binaryd --name="${REPO}" --veyron.tcp.address=127.0.0.1:0
+ echo "Is it running?"
+ ps
# Create a binary file.
local -r BINARY="${REPO}/test-binary"
diff --git a/services/mgmt/binary/impl/impl_test.go b/services/mgmt/binary/impl/impl_test.go
index 60dc57b..e88e539 100644
--- a/services/mgmt/binary/impl/impl_test.go
+++ b/services/mgmt/binary/impl/impl_test.go
@@ -9,13 +9,14 @@
"path/filepath"
"testing"
- "veyron.io/veyron/veyron/lib/testutil"
-
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/services/mgmt/repository"
"veyron.io/veyron/veyron2/verror"
"veyron.io/veyron/veyron2/vlog"
+
+ "veyron.io/veyron/veyron/lib/testutil"
+ "veyron.io/veyron/veyron/profiles"
)
const (
@@ -109,10 +110,9 @@
if err != nil {
t.Fatalf("NewDispatcher(%v, %v, %v) failed: %v", root, depth, nil, err)
}
- protocol, hostname := "tcp", "127.0.0.1:0"
- endpoint, err := server.Listen(protocol, hostname)
+ endpoint, err := server.ListenX(profiles.LocalListenSpec)
if err != nil {
- t.Fatalf("Listen(%v, %v) failed: %v", protocol, hostname, err)
+ t.Fatalf("Listen(%s) failed: %v", profiles.LocalListenSpec, err)
}
dontPublishName := ""
if err := server.Serve(dontPublishName, dispatcher); err != nil {
diff --git a/services/mgmt/build/buildd/main.go b/services/mgmt/build/buildd/main.go
index f2e1937..01527ac 100644
--- a/services/mgmt/build/buildd/main.go
+++ b/services/mgmt/build/buildd/main.go
@@ -4,22 +4,18 @@
"flag"
"os"
- "veyron.io/veyron/veyron/lib/signals"
- vflag "veyron.io/veyron/veyron/security/flag"
- "veyron.io/veyron/veyron/services/mgmt/build/impl"
-
"veyron.io/veyron/veyron2/ipc"
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/services/mgmt/build"
"veyron.io/veyron/veyron2/vlog"
+
+ "veyron.io/veyron/veyron/lib/signals"
+ "veyron.io/veyron/veyron/profiles/roaming"
+ vflag "veyron.io/veyron/veyron/security/flag"
+ "veyron.io/veyron/veyron/services/mgmt/build/impl"
)
var (
- // TODO(rthellend): Remove the protocol and address flags when the config
- // manager is working.
- protocol = flag.String("protocol", "tcp", "protocol to listen on")
- address = flag.String("address", ":0", "address to listen on")
-
gobin = flag.String("gobin", "go", "path to the Go compiler")
goroot = flag.String("goroot", os.Getenv("GOROOT"), "GOROOT to use with the Go compiler")
name = flag.String("name", "", "name to mount the build server as")
@@ -35,9 +31,9 @@
return
}
defer server.Stop()
- endpoint, err := server.Listen(*protocol, *address)
+ endpoint, err := server.ListenX(roaming.ListenSpec)
if err != nil {
- vlog.Errorf("Listen(%v, %v) failed: %v", *protocol, *address, err)
+ vlog.Errorf("Listen(%s) failed: %v", roaming.ListenSpec, err)
return
}
if err := server.Serve(*name, ipc.LeafDispatcher(build.NewServerBuilder(impl.NewInvoker(*gobin, *goroot)), vflag.NewAuthorizerOrDie())); err != nil {
diff --git a/services/mgmt/build/buildd/test.sh b/services/mgmt/build/buildd/test.sh
index e8d6b30..d8a2956 100755
--- a/services/mgmt/build/buildd/test.sh
+++ b/services/mgmt/build/buildd/test.sh
@@ -22,7 +22,7 @@
local -r SERVER="buildd-test-server"
local GO_BIN=$(which go)
local -r GO_ROOT=$("${GO_BIN}" env GOROOT)
- shell_test::start_server ./buildd --name="${SERVER}" --gobin="${GO_BIN}" --goroot="${GO_ROOT}" --address=127.0.0.1:0
+ shell_test::start_server ./buildd --name="${SERVER}" --gobin="${GO_BIN}" --goroot="${GO_ROOT}" --veyron.tcp.address=127.0.0.1:0
# Create and build a test source file.
local -r GO_PATH=$(shell::tmp_dir)
diff --git a/services/mgmt/build/impl/impl_test.go b/services/mgmt/build/impl/impl_test.go
index 76d7f07..3fe0517 100644
--- a/services/mgmt/build/impl/impl_test.go
+++ b/services/mgmt/build/impl/impl_test.go
@@ -8,11 +8,12 @@
"strings"
"testing"
- _ "veyron.io/veyron/veyron/lib/testutil"
-
"veyron.io/veyron/veyron2/ipc"
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/services/mgmt/build"
+
+ _ "veyron.io/veyron/veyron/lib/testutil"
+ "veyron.io/veyron/veyron/profiles"
)
func init() {
@@ -51,10 +52,9 @@
if err != nil {
t.Fatalf("NewServer() failed: %v", err)
}
- protocol, hostname := "tcp", "127.0.0.1:0"
- endpoint, err := server.Listen(protocol, hostname)
+ endpoint, err := server.ListenX(profiles.LocalListenSpec)
if err != nil {
- t.Fatalf("Listen(%v, %v) failed: %v", protocol, hostname, err)
+ t.Fatalf("Listen(%s) failed: %v", profiles.LocalListenSpec, err)
}
unpublished := ""
if err := server.Serve(unpublished, ipc.LeafDispatcher(build.NewServerBuilder(NewInvoker(gobin, goroot)), nil)); err != nil {
diff --git a/services/mgmt/lib/binary/impl_test.go b/services/mgmt/lib/binary/impl_test.go
index b68132d..9882cd9 100644
--- a/services/mgmt/lib/binary/impl_test.go
+++ b/services/mgmt/lib/binary/impl_test.go
@@ -7,12 +7,13 @@
"path/filepath"
"testing"
- "veyron.io/veyron/veyron/lib/testutil"
- "veyron.io/veyron/veyron/services/mgmt/binary/impl"
-
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/vlog"
+
+ "veyron.io/veyron/veyron/lib/testutil"
+ "veyron.io/veyron/veyron/profiles"
+ "veyron.io/veyron/veyron/services/mgmt/binary/impl"
)
const (
@@ -43,10 +44,9 @@
if err != nil {
t.Fatalf("NewDispatcher(%v, %v, %v) failed: %v", root, depth, nil, err)
}
- protocol, hostname := "tcp", "127.0.0.1:0"
- endpoint, err := server.Listen(protocol, hostname)
+ endpoint, err := server.ListenX(profiles.LocalListenSpec)
if err != nil {
- t.Fatalf("Listen(%v, %v) failed: %v", protocol, hostname, err)
+ t.Fatalf("Listen(%s) failed: %v", profiles.LocalListenSpec, err)
}
suffix := ""
if err := server.Serve(suffix, dispatcher); err != nil {
diff --git a/services/mgmt/node/impl/util_test.go b/services/mgmt/node/impl/util_test.go
index 0ccebe3..6d7e0f2 100644
--- a/services/mgmt/node/impl/util_test.go
+++ b/services/mgmt/node/impl/util_test.go
@@ -5,12 +5,6 @@
"os"
"testing"
- mtlib "veyron.io/veyron/veyron/services/mounttable/lib"
-
- "veyron.io/veyron/veyron/lib/testutil/blackbox"
- "veyron.io/veyron/veyron/lib/testutil/security"
- "veyron.io/veyron/veyron/services/mgmt/lib/exec"
-
"veyron.io/veyron/veyron2"
"veyron.io/veyron/veyron2/ipc"
"veyron.io/veyron/veyron2/naming"
@@ -18,6 +12,12 @@
"veyron.io/veyron/veyron2/services/mgmt/node"
"veyron.io/veyron/veyron2/verror"
"veyron.io/veyron/veyron2/vlog"
+
+ "veyron.io/veyron/veyron/lib/testutil/blackbox"
+ "veyron.io/veyron/veyron/lib/testutil/security"
+ "veyron.io/veyron/veyron/profiles"
+ "veyron.io/veyron/veyron/services/mgmt/lib/exec"
+ mtlib "veyron.io/veyron/veyron/services/mounttable/lib"
)
// TODO(caprita): I've had to write one too many of these, let's move it to some
@@ -34,10 +34,9 @@
if err != nil {
t.Fatalf("NewMountTable() failed: %v", err)
}
- protocol, hostname := "tcp", "127.0.0.1:0"
- endpoint, err := server.Listen(protocol, hostname)
+ endpoint, err := server.ListenX(profiles.LocalListenSpec)
if err != nil {
- t.Fatalf("Listen(%v, %v) failed: %v", protocol, hostname, err)
+ t.Fatalf("Listen(%s) failed: %v", profiles.LocalListenSpec, err)
}
if err := server.Serve("", dispatcher); err != nil {
t.Fatalf("Serve(%v) failed: %v", dispatcher, err)
diff --git a/services/mgmt/node/noded/main.go b/services/mgmt/node/noded/main.go
index 6e33c20..3ef8fa4 100644
--- a/services/mgmt/node/noded/main.go
+++ b/services/mgmt/node/noded/main.go
@@ -3,21 +3,17 @@
import (
"flag"
- "veyron.io/veyron/veyron/lib/signals"
- "veyron.io/veyron/veyron/services/mgmt/node/config"
- "veyron.io/veyron/veyron/services/mgmt/node/impl"
-
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/vlog"
+
+ "veyron.io/veyron/veyron/lib/signals"
+ "veyron.io/veyron/veyron/profiles/roaming"
+ "veyron.io/veyron/veyron/services/mgmt/node/config"
+ "veyron.io/veyron/veyron/services/mgmt/node/impl"
)
var (
- // TODO(rthellend): Remove the protocol and address flags when the config
- // manager is working.
- protocol = flag.String("protocol", "tcp", "protocol to listen on")
- address = flag.String("address", ":0", "address to listen on")
-
publishAs = flag.String("name", "", "name to publish the node manager at")
)
@@ -30,9 +26,9 @@
vlog.Fatalf("NewServer() failed: %v", err)
}
defer server.Stop()
- endpoint, err := server.Listen(*protocol, *address)
+ endpoint, err := server.ListenX(roaming.ListenSpec)
if err != nil {
- vlog.Fatalf("Listen(%v, %v) failed: %v", *protocol, *address, err)
+ vlog.Fatalf("Listen(%s) failed: %v", roaming.ListenSpec, err)
}
name := naming.MakeTerminal(naming.JoinAddressName(endpoint.String(), ""))
vlog.VI(0).Infof("Node manager object name: %v", name)
diff --git a/services/mgmt/profile/impl/impl_test.go b/services/mgmt/profile/impl/impl_test.go
index 469dffc..840f09b 100644
--- a/services/mgmt/profile/impl/impl_test.go
+++ b/services/mgmt/profile/impl/impl_test.go
@@ -5,12 +5,13 @@
"reflect"
"testing"
- "veyron.io/veyron/veyron/services/mgmt/profile"
- "veyron.io/veyron/veyron/services/mgmt/repository"
-
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/services/mgmt/build"
+
+ "veyron.io/veyron/veyron/profiles"
+ "veyron.io/veyron/veyron/services/mgmt/profile"
+ "veyron.io/veyron/veyron/services/mgmt/repository"
)
var (
@@ -54,10 +55,9 @@
if err != nil {
t.Fatalf("NewDispatcher() failed: %v", err)
}
- protocol, hostname := "tcp", "127.0.0.1:0"
- endpoint, err := server.Listen(protocol, hostname)
+ endpoint, err := server.ListenX(profiles.LocalListenSpec)
if err != nil {
- t.Fatalf("Listen(%v, %v) failed: %v", protocol, hostname, err)
+ t.Fatalf("Listen(%s) failed: %v", profiles.LocalListenSpec, err)
}
if err := server.Serve("", dispatcher); err != nil {
t.Fatalf("Serve failed: %v", err)
diff --git a/services/mgmt/profile/profiled/main.go b/services/mgmt/profile/profiled/main.go
index 9278d56..0d88909 100644
--- a/services/mgmt/profile/profiled/main.go
+++ b/services/mgmt/profile/profiled/main.go
@@ -3,20 +3,16 @@
import (
"flag"
- "veyron.io/veyron/veyron/lib/signals"
- vflag "veyron.io/veyron/veyron/security/flag"
- "veyron.io/veyron/veyron/services/mgmt/profile/impl"
-
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/vlog"
+
+ "veyron.io/veyron/veyron/lib/signals"
+ "veyron.io/veyron/veyron/profiles/roaming"
+ vflag "veyron.io/veyron/veyron/security/flag"
+ "veyron.io/veyron/veyron/services/mgmt/profile/impl"
)
var (
- // TODO(rthellend): Remove the protocol and address flags when the config
- // manager is working.
- protocol = flag.String("protocol", "tcp", "protocol to listen on")
- address = flag.String("address", ":0", "address to listen on")
-
name = flag.String("name", "", "name to mount the profile repository as")
store = flag.String("store", "", "local directory to store profiles in")
)
@@ -39,9 +35,9 @@
vlog.Fatalf("NewDispatcher() failed: %v", err)
}
- endpoint, err := server.Listen(*protocol, *address)
+ endpoint, err := server.ListenX(roaming.ListenSpec)
if err != nil {
- vlog.Fatalf("Listen(%v, %v) failed: %v", *protocol, *address, err)
+ vlog.Fatalf("Listen(%s) failed: %v", roaming.ListenSpec, err)
}
if err := server.Serve(*name, dispatcher); err != nil {
vlog.Fatalf("Serve(%v) failed: %v", *name, err)
diff --git a/services/mgmt/profile/profiled/test.sh b/services/mgmt/profile/profiled/test.sh
index 1f65ae0..d6a7bf2 100755
--- a/services/mgmt/profile/profiled/test.sh
+++ b/services/mgmt/profile/profiled/test.sh
@@ -23,7 +23,7 @@
# Start the profile repository daemon.
local -r REPO="profiled-test-repo"
local -r STORE=$(shell::tmp_dir)
- shell_test::start_server ./profiled --name="${REPO}" --address=127.0.0.1:0 --store="${STORE}"
+ shell_test::start_server ./profiled --name="${REPO}" --veyron.tcp.address=127.0.0.1:0 --store="${STORE}"
# Create a profile.
local -r PROFILE="${REPO}/test-profile"
diff --git a/services/mgmt/root/rootd/main.go b/services/mgmt/root/rootd/main.go
index 0e20aaa..58b699f 100644
--- a/services/mgmt/root/rootd/main.go
+++ b/services/mgmt/root/rootd/main.go
@@ -1,20 +1,12 @@
package main
import (
- "flag"
-
- "veyron.io/veyron/veyron/lib/signals"
- "veyron.io/veyron/veyron/services/mgmt/root/impl"
-
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/vlog"
-)
-var (
- // TODO(rthellend): Remove the protocol and address flags when the config
- // manager is working.
- protocol = flag.String("protocol", "tcp", "protocol to listen on")
- address = flag.String("address", ":0", "address to listen on")
+ "veyron.io/veyron/veyron/lib/signals"
+ "veyron.io/veyron/veyron/profiles/roaming"
+ "veyron.io/veyron/veyron/services/mgmt/root/impl"
)
func main() {
@@ -27,9 +19,9 @@
}
defer server.Stop()
dispatcher := impl.NewDispatcher()
- ep, err := server.Listen(*protocol, *address)
+ ep, err := server.ListenX(roaming.ListenSpec)
if err != nil {
- vlog.Errorf("Listen(%v, %v) failed: %v", *protocol, *address, err)
+ vlog.Errorf("Listen(%s) failed: %v", roaming.ListenSpec, err)
return
}
vlog.VI(0).Infof("Listening on %v", ep)
diff --git a/services/mgmt/stats/impl/stats_invoker_test.go b/services/mgmt/stats/impl/stats_invoker_test.go
index f408fbc..02d0b10 100644
--- a/services/mgmt/stats/impl/stats_invoker_test.go
+++ b/services/mgmt/stats/impl/stats_invoker_test.go
@@ -6,17 +6,18 @@
"testing"
"time"
- libstats "veyron.io/veyron/veyron/lib/stats"
- "veyron.io/veyron/veyron/lib/stats/histogram"
- istats "veyron.io/veyron/veyron/services/mgmt/stats"
- "veyron.io/veyron/veyron/services/mgmt/stats/impl"
-
"veyron.io/veyron/veyron2/ipc"
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/security"
"veyron.io/veyron/veyron2/services/mgmt/stats"
"veyron.io/veyron/veyron2/services/watch/types"
+
+ libstats "veyron.io/veyron/veyron/lib/stats"
+ "veyron.io/veyron/veyron/lib/stats/histogram"
+ "veyron.io/veyron/veyron/profiles"
+ istats "veyron.io/veyron/veyron/services/mgmt/stats"
+ "veyron.io/veyron/veyron/services/mgmt/stats/impl"
)
type statsDispatcher struct {
@@ -33,7 +34,7 @@
t.Fatalf("NewServer failed: %v", err)
return "", nil
}
- endpoint, err := server.Listen("tcp", "localhost:0")
+ endpoint, err := server.ListenX(profiles.LocalListenSpec)
if err != nil {
t.Fatalf("Listen failed: %v", err)
return "", nil
diff --git a/services/mounttable/lib/mounttable_test.go b/services/mounttable/lib/mounttable_test.go
index 32bba94..d830415 100644
--- a/services/mounttable/lib/mounttable_test.go
+++ b/services/mounttable/lib/mounttable_test.go
@@ -9,8 +9,6 @@
"testing"
"time"
- _ "veyron.io/veyron/veyron/lib/testutil"
-
"veyron.io/veyron/veyron2"
"veyron.io/veyron/veyron2/context"
"veyron.io/veyron/veyron2/ipc"
@@ -20,6 +18,9 @@
"veyron.io/veyron/veyron2/services/mounttable"
"veyron.io/veyron/veyron2/services/mounttable/types"
"veyron.io/veyron/veyron2/vlog"
+
+ _ "veyron.io/veyron/veyron/lib/testutil"
+ "veyron.io/veyron/veyron/profiles"
)
// stupidNS is a version of naming.Namespace that we can control. This exists so that we have some
@@ -193,7 +194,7 @@
boom(t, "NewMountTable: %v", err)
}
// Start serving on a loopback address.
- e, err := server.Listen("tcp", "127.0.0.1:0")
+ e, err := server.ListenX(profiles.LocalListenSpec)
if err != nil {
boom(t, "Failed to Listen mount table: %s", err)
}
@@ -212,7 +213,7 @@
boom(t, "r.NewServer: %s", err)
}
// Start serving on a loopback address.
- e, err := server.Listen("tcp", "127.0.0.1:0")
+ e, err := server.ListenX(profiles.LocalListenSpec)
if err != nil {
boom(t, "Failed to Listen mount table: %s", err)
}
diff --git a/services/mounttable/lib/neighborhood_test.go b/services/mounttable/lib/neighborhood_test.go
index 4b2b610..edccc7f 100644
--- a/services/mounttable/lib/neighborhood_test.go
+++ b/services/mounttable/lib/neighborhood_test.go
@@ -7,13 +7,14 @@
"testing"
"time"
- _ "veyron.io/veyron/veyron/lib/testutil"
-
"veyron.io/veyron/veyron2"
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/services/mounttable"
"veyron.io/veyron/veyron2/vlog"
+
+ _ "veyron.io/veyron/veyron/lib/testutil"
+ "veyron.io/veyron/veyron/profiles"
)
func protocolAndAddress(e naming.Endpoint) (string, string, error) {
@@ -35,7 +36,7 @@
defer server.Stop()
// Start serving on a loopback address.
- e, err := server.Listen("tcp", "127.0.0.1:0")
+ e, err := server.ListenX(profiles.LocalListenSpec)
if err != nil {
boom(t, "Failed to Listen mount table: %s", err)
}
diff --git a/services/wsprd/ipc/server/server.go b/services/wsprd/ipc/server/server.go
index 86068fa..23f6762 100644
--- a/services/wsprd/ipc/server/server.go
+++ b/services/wsprd/ipc/server/server.go
@@ -7,15 +7,15 @@
"fmt"
"sync"
- "veyron.io/veyron/veyron/services/wsprd/lib"
- "veyron.io/veyron/veyron/services/wsprd/signature"
-
- vsecurity "veyron.io/veyron/veyron/security"
"veyron.io/veyron/veyron2"
"veyron.io/veyron/veyron2/ipc"
"veyron.io/veyron/veyron2/security"
"veyron.io/veyron/veyron2/verror"
"veyron.io/veyron/veyron2/vlog"
+
+ vsecurity "veyron.io/veyron/veyron/security"
+ "veyron.io/veyron/veyron/services/wsprd/lib"
+ "veyron.io/veyron/veyron/services/wsprd/signature"
)
type Flow struct {