veyron2/ipc: 1 of n. 'Invoker and Signature' rationalisation.

This is the first of several CLs to improve the RPC serving
interfaces. In summary these CLs will:
- make it possible to implement __Signature and __Implements
methods sensibly for Javascript.
- allow for serving of a single object on a name with no
boilerplate
- allow for improved generated code for vdl interfaces
- sundry other cleanups as we go.

The final API will change the method signature of two methods and
add a new method.

ipc.Server.Serve(string, ipc.Dispatcher) will change to
ipc.Server.Serve(string, interface{})
This new API will assume 'LeafDispatcher' semantics - the object
supplied is served for the specified name. If a non-default authorizer
is required it must be provided as an option when the server is
created. This will take out a lot of boiler plate from many apps.

the previous .Serve functionality is now available as:
ipc.Server.ServeWithDispatcher(string, ipc.Dispatcher)

To support the above changes, the ipc.Dispatcher.Lookup method
now returns an interface{} rather than ipc.Invoker. If the
returned value is an ipc.Invoker it will be used, if not, one
a default one will be used in conjunction with the supplied object.

The transition plan is transparent to existing code except
that the return type of Lookup must be changed. This CL
implements this first, non transparent portion of this change,
nameling, changing the signature of the Lookup method.

Change-Id: Id0f0119fa3b5680872f57d703ba4601ce51eef6c
diff --git a/lib/modules/core/echo.go b/lib/modules/core/echo.go
index f3adb9f..8cc7b33 100644
--- a/lib/modules/core/echo.go
+++ b/lib/modules/core/echo.go
@@ -22,7 +22,7 @@
 
 type treeDispatcher struct{ id string }
 
-func (d treeDispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d treeDispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	return ipc.ReflectInvoker(&echoServerObject{d.id, suffix}), nil, nil
 }
 
diff --git a/runtimes/google/ipc/flow_test.go b/runtimes/google/ipc/flow_test.go
index b78a56f..97ca9cd 100644
--- a/runtimes/google/ipc/flow_test.go
+++ b/runtimes/google/ipc/flow_test.go
@@ -59,7 +59,7 @@
 	newInvoker func(suffix string) ipc.Invoker
 }
 
-func (td testDisp) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (td testDisp) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	return td.newInvoker(suffix), testServerAuthorizer{}, nil
 }
 
diff --git a/runtimes/google/ipc/full_test.go b/runtimes/google/ipc/full_test.go
index 67638e1..1e0b892 100644
--- a/runtimes/google/ipc/full_test.go
+++ b/runtimes/google/ipc/full_test.go
@@ -146,7 +146,7 @@
 
 type testServerDisp struct{ server interface{} }
 
-func (t testServerDisp) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (t testServerDisp) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	// If suffix is "nilAuth" we use default authorization, if it is "aclAuth" we
 	// use an ACL based authorizer, and otherwise we use the custom testServerAuthorizer.
 	var authorizer security.Authorizer
@@ -548,7 +548,7 @@
 }
 
 // Implements ipc.Dispatcher
-func (s *dischargeImpetusTester) Lookup(_, _ string) (ipc.Invoker, security.Authorizer, error) {
+func (s *dischargeImpetusTester) Lookup(_, _ string) (interface{}, security.Authorizer, error) {
 	return ipc.ReflectInvoker(s), testServerAuthorizer{}, nil
 }
 
diff --git a/runtimes/google/ipc/server.go b/runtimes/google/ipc/server.go
index 08fb74a..3f11812 100644
--- a/runtimes/google/ipc/server.go
+++ b/runtimes/google/ipc/server.go
@@ -812,11 +812,17 @@
 		fs.discharges[d.ID()] = d
 	}
 	// Lookup the invoker.
-	invoker, auth, suffix, verr := fs.lookup(req.Suffix, req.Method)
+	obj, auth, suffix, verr := fs.lookup(req.Suffix, req.Method)
 	fs.suffix = suffix // with leading /'s stripped
 	if verr != nil {
 		return nil, verr
 	}
+	// TODO(cnicolaou): ipc.Serve TRANSITION
+	invoker, ok := obj.(ipc.Invoker)
+	if !ok {
+		panic("Lookup should have returned an ipc.Invoker")
+	}
+
 	// Prepare invoker and decode args.
 	numArgs := int(req.NumPosArgs)
 	argptrs, label, err := invoker.Prepare(req.Method, numArgs)
@@ -854,7 +860,8 @@
 // with ipc.DebugKeyword, we use the internal debug dispatcher to look up the
 // invoker. Otherwise, and we use the server's dispatcher. The (stripped) name
 // and dispatch suffix are also returned.
-func (fs *flowServer) lookup(name, method string) (ipc.Invoker, security.Authorizer, string, verror.E) {
+// TODO(cnicolaou): change this back returning in ipc.Invoker in the pt2 CL.
+func (fs *flowServer) lookup(name, method string) (interface{}, security.Authorizer, string, verror.E) {
 	name = strings.TrimLeft(name, "/")
 	if method == "Glob" && len(name) == 0 {
 		return ipc.ReflectInvoker(&globInvoker{fs}), &acceptAllAuthorizer{}, name, nil
@@ -916,11 +923,16 @@
 	if d == nil {
 		return nil
 	}
-	invoker, auth, err := d.Lookup("", "Glob")
+	obj, auth, err := d.Lookup("", "Glob")
 	if err != nil {
 		return err
 	}
-	if invoker == nil {
+	// TODO(cnicolaou): ipc.Serve TRANSITION
+	invoker, ok := obj.(ipc.Invoker)
+	if !ok {
+		panic("Lookup should have returned an ipc.Invoker")
+	}
+	if obj == nil || !ok {
 		return verror.NoExistf("ipc: invoker not found for Glob")
 	}
 
@@ -945,7 +957,7 @@
 	if res == nil {
 		return nil
 	}
-	err, ok := res.(error)
+	err, ok = res.(error)
 	if !ok {
 		return verror.BadArgf("unexpected result type. Got %T, want error", res)
 	}
diff --git a/runtimes/google/naming/namespace/all_test.go b/runtimes/google/naming/namespace/all_test.go
index 9c29b25..87c80da 100644
--- a/runtimes/google/naming/namespace/all_test.go
+++ b/runtimes/google/naming/namespace/all_test.go
@@ -118,7 +118,7 @@
 
 type dispatcher struct{}
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	return ipc.ReflectInvoker(&testServer{suffix}), allowEveryoneAuthorizer{}, nil
 }
 
diff --git a/services/identity/identityd/main.go b/services/identity/identityd/main.go
index 2ba0fc2..8a9b860 100644
--- a/services/identity/identityd/main.go
+++ b/services/identity/identityd/main.go
@@ -159,7 +159,7 @@
 
 type dispatcher map[string]ipc.Invoker
 
-func (d dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	if invoker := d[suffix]; invoker != nil {
 		return invoker, allowEveryoneAuthorizer{}, nil
 	}
diff --git a/services/mgmt/application/impl/dispatcher.go b/services/mgmt/application/impl/dispatcher.go
index f2b8793..48b6c4f 100644
--- a/services/mgmt/application/impl/dispatcher.go
+++ b/services/mgmt/application/impl/dispatcher.go
@@ -29,7 +29,7 @@
 
 // DISPATCHER INTERFACE IMPLEMENTATION
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	invoker := ipc.ReflectInvoker(repository.NewServerApplication(NewInvoker(d.store, d.storeRoot, suffix)))
 	return invoker, d.auth, nil
 }
diff --git a/services/mgmt/binary/impl/dispatcher.go b/services/mgmt/binary/impl/dispatcher.go
index dc6ddcb..7f54fb7 100644
--- a/services/mgmt/binary/impl/dispatcher.go
+++ b/services/mgmt/binary/impl/dispatcher.go
@@ -51,7 +51,7 @@
 
 // DISPATCHER INTERFACE IMPLEMENTATION
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	invoker := ipc.ReflectInvoker(repository.NewServerBinary(newInvoker(d.state, suffix)))
 	return invoker, d.auth, nil
 }
diff --git a/services/mgmt/debug/dispatcher.go b/services/mgmt/debug/dispatcher.go
index df7c301..9f03323 100644
--- a/services/mgmt/debug/dispatcher.go
+++ b/services/mgmt/debug/dispatcher.go
@@ -25,7 +25,7 @@
 	return &dispatcher{logsDir, authorizer}
 }
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	if method == "Signature" {
 		return NewSignatureInvoker(suffix), d.auth, nil
 	}
diff --git a/services/mgmt/lib/toplevelglob/invoker.go b/services/mgmt/lib/toplevelglob/invoker.go
index fd605a4..c959fe7 100644
--- a/services/mgmt/lib/toplevelglob/invoker.go
+++ b/services/mgmt/lib/toplevelglob/invoker.go
@@ -42,10 +42,15 @@
 }
 
 func (i *invoker) leafGlob(call ipc.ServerCall, leaf string, pattern string) error {
-	invoker, _, err := i.d.Lookup(leaf, "Glob")
+	obj, _, err := i.d.Lookup(leaf, "Glob")
 	if err != nil {
 		return err
 	}
+	// TODO(cnicolaou): ipc.Serve TRANSITION
+	invoker, ok := obj.(ipc.Invoker)
+	if !ok {
+		panic("Lookup should have returned an ipc.Invoker")
+	}
 	argptrs := []interface{}{&pattern}
 	leafCall := &localServerCall{call, leaf}
 	results, err := invoker.Invoke("Glob", leafCall, argptrs)
@@ -59,7 +64,7 @@
 	if res == nil {
 		return nil
 	}
-	err, ok := res.(error)
+	err, ok = res.(error)
 	if !ok {
 		return verror.BadArgf("unexpected result type. Got %T, want error", res)
 	}
diff --git a/services/mgmt/logreader/impl/logdir_invoker_test.go b/services/mgmt/logreader/impl/logdir_invoker_test.go
index 8bd99a3..0cba1db 100644
--- a/services/mgmt/logreader/impl/logdir_invoker_test.go
+++ b/services/mgmt/logreader/impl/logdir_invoker_test.go
@@ -10,7 +10,6 @@
 
 	"veyron.io/veyron/veyron/services/mgmt/logreader/impl"
 
-	"veyron.io/veyron/veyron2/ipc"
 	"veyron.io/veyron/veyron2/naming"
 	"veyron.io/veyron/veyron2/rt"
 	"veyron.io/veyron/veyron2/security"
@@ -22,7 +21,7 @@
 	root string
 }
 
-func (d *logDirectoryDispatcher) Lookup(suffix, _ string) (ipc.Invoker, security.Authorizer, error) {
+func (d *logDirectoryDispatcher) Lookup(suffix, _ string) (interface{}, security.Authorizer, error) {
 	return impl.NewLogDirectoryInvoker(d.root, suffix), nil, nil
 }
 
diff --git a/services/mgmt/logreader/impl/logfile_invoker_test.go b/services/mgmt/logreader/impl/logfile_invoker_test.go
index 06487e2..0cc7615 100644
--- a/services/mgmt/logreader/impl/logfile_invoker_test.go
+++ b/services/mgmt/logreader/impl/logfile_invoker_test.go
@@ -8,7 +8,6 @@
 
 	"veyron.io/veyron/veyron/services/mgmt/logreader/impl"
 
-	"veyron.io/veyron/veyron2/ipc"
 	"veyron.io/veyron/veyron2/naming"
 	"veyron.io/veyron/veyron2/rt"
 	"veyron.io/veyron/veyron2/security"
@@ -21,7 +20,7 @@
 	root string
 }
 
-func (d *logFileDispatcher) Lookup(suffix, _ string) (ipc.Invoker, security.Authorizer, error) {
+func (d *logFileDispatcher) Lookup(suffix, _ string) (interface{}, security.Authorizer, error) {
 	return impl.NewLogFileInvoker(d.root, suffix), nil, nil
 }
 
diff --git a/services/mgmt/node/impl/dispatcher.go b/services/mgmt/node/impl/dispatcher.go
index 684ce97..4d1865e 100644
--- a/services/mgmt/node/impl/dispatcher.go
+++ b/services/mgmt/node/impl/dispatcher.go
@@ -221,7 +221,7 @@
 
 // DISPATCHER INTERFACE IMPLEMENTATION
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	components := strings.Split(suffix, "/")
 	for i := 0; i < len(components); i++ {
 		if len(components[i]) == 0 {
diff --git a/services/mgmt/node/impl/proxy_invoker_test.go b/services/mgmt/node/impl/proxy_invoker_test.go
index 7f84099..3380f28 100644
--- a/services/mgmt/node/impl/proxy_invoker_test.go
+++ b/services/mgmt/node/impl/proxy_invoker_test.go
@@ -5,7 +5,6 @@
 	"sort"
 	"testing"
 
-	"veyron.io/veyron/veyron2/ipc"
 	"veyron.io/veyron/veyron2/naming"
 	"veyron.io/veyron/veyron2/rt"
 	"veyron.io/veyron/veyron2/security"
@@ -102,6 +101,6 @@
 	sigStub signatureStub
 }
 
-func (d *proxyDispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *proxyDispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	return &proxyInvoker{naming.Join(d.remote, suffix), d.label, d.sigStub}, nil, nil
 }
diff --git a/services/mgmt/pprof/client/proxy_test.go b/services/mgmt/pprof/client/proxy_test.go
index 9c5f251..a563d9f 100644
--- a/services/mgmt/pprof/client/proxy_test.go
+++ b/services/mgmt/pprof/client/proxy_test.go
@@ -20,7 +20,7 @@
 	invoker ipc.Invoker
 }
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	return d.invoker, nil, nil
 }
 
diff --git a/services/mgmt/profile/impl/dispatcher.go b/services/mgmt/profile/impl/dispatcher.go
index 819688b..075fcdc 100644
--- a/services/mgmt/profile/impl/dispatcher.go
+++ b/services/mgmt/profile/impl/dispatcher.go
@@ -29,7 +29,7 @@
 
 // DISPATCHER INTERFACE IMPLEMENTATION
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	invoker := ipc.ReflectInvoker(repository.NewServerProfile(NewInvoker(d.store, d.storeRoot, suffix)))
 	return invoker, d.auth, nil
 }
diff --git a/services/mgmt/root/impl/dispatcher.go b/services/mgmt/root/impl/dispatcher.go
index a0058be..6cf5ee6 100644
--- a/services/mgmt/root/impl/dispatcher.go
+++ b/services/mgmt/root/impl/dispatcher.go
@@ -20,6 +20,6 @@
 
 // DISPATCHER INTERFACE IMPLEMENTATION
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	return ipc.ReflectInvoker(root.NewServerRoot(d.state)), nil, nil
 }
diff --git a/services/mgmt/stats/impl/stats_invoker_test.go b/services/mgmt/stats/impl/stats_invoker_test.go
index 2b5b4ae..d15c915 100644
--- a/services/mgmt/stats/impl/stats_invoker_test.go
+++ b/services/mgmt/stats/impl/stats_invoker_test.go
@@ -6,7 +6,6 @@
 	"testing"
 	"time"
 
-	"veyron.io/veyron/veyron2/ipc"
 	"veyron.io/veyron/veyron2/naming"
 	"veyron.io/veyron/veyron2/rt"
 	"veyron.io/veyron/veyron2/security"
@@ -23,7 +22,7 @@
 type statsDispatcher struct {
 }
 
-func (d *statsDispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *statsDispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	return impl.NewStatsInvoker(suffix, 100*time.Millisecond), nil, nil
 }
 
diff --git a/services/mounttable/lib/collectionserver_test.go b/services/mounttable/lib/collectionserver_test.go
index 55fa7e6..90a0208 100644
--- a/services/mounttable/lib/collectionserver_test.go
+++ b/services/mounttable/lib/collectionserver_test.go
@@ -29,7 +29,7 @@
 }
 
 // Lookup implements ipc.Dispatcher.Lookup.
-func (d *collectionDispatcher) Lookup(name, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *collectionDispatcher) Lookup(name, method string) (interface{}, security.Authorizer, error) {
 	rpcc := &rpcContext{name: name, collectionServer: d.collectionServer}
 	return ipc.ReflectInvoker(rpcc), d, nil
 }
diff --git a/services/mounttable/lib/mounttable.go b/services/mounttable/lib/mounttable.go
index a854b70..a0955a5 100644
--- a/services/mounttable/lib/mounttable.go
+++ b/services/mounttable/lib/mounttable.go
@@ -95,7 +95,7 @@
 }
 
 // Lookup implements ipc.Dispatcher.Lookup.
-func (mt *mountTable) Lookup(name, method string) (ipc.Invoker, security.Authorizer, error) {
+func (mt *mountTable) Lookup(name, method string) (interface{}, security.Authorizer, error) {
 	vlog.VI(2).Infof("*********************Lookup %s", name)
 	mt.RLock()
 	defer mt.RUnlock()
diff --git a/services/mounttable/lib/neighborhood.go b/services/mounttable/lib/neighborhood.go
index 5300429..4f7fffa 100644
--- a/services/mounttable/lib/neighborhood.go
+++ b/services/mounttable/lib/neighborhood.go
@@ -123,7 +123,7 @@
 }
 
 // Lookup implements ipc.Dispatcher.Lookup.
-func (nh *neighborhood) Lookup(name, method string) (ipc.Invoker, security.Authorizer, error) {
+func (nh *neighborhood) Lookup(name, method string) (interface{}, security.Authorizer, error) {
 	vlog.VI(1).Infof("*********************LookupServer '%s'\n", name)
 	elems := strings.Split(name, "/")[nh.nelems:]
 	if name == "" {
diff --git a/tools/application/impl_test.go b/tools/application/impl_test.go
index b6d5d64..c55a5e9 100644
--- a/tools/application/impl_test.go
+++ b/tools/application/impl_test.go
@@ -68,7 +68,7 @@
 	return &dispatcher{}
 }
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	invoker := ipc.ReflectInvoker(repository.NewServerApplication(&server{suffix: suffix}))
 	return invoker, nil, nil
 }
diff --git a/tools/associate/impl_test.go b/tools/associate/impl_test.go
index 7043fcf..fff2ee5 100644
--- a/tools/associate/impl_test.go
+++ b/tools/associate/impl_test.go
@@ -62,18 +62,18 @@
 func (*mockNodeInvoker) IsRunnable(_ ipc.ServerContext, description binary.Description) (bool, error) {
 	return false, nil
 }
-func (*mockNodeInvoker) Reset(call ipc.ServerContext, deadline uint64) error               { return nil }
-func (*mockNodeInvoker) Install(ipc.ServerContext, string) (string, error)                 { return "", nil }
-func (*mockNodeInvoker) Refresh(ipc.ServerContext) error                                   { return nil }
-func (*mockNodeInvoker) Restart(ipc.ServerContext) error                                   { return nil }
-func (*mockNodeInvoker) Resume(ipc.ServerContext) error                                    { return nil }
-func (i *mockNodeInvoker) Revert(call ipc.ServerContext) error                             { return nil }
-func (*mockNodeInvoker) Start(ipc.ServerContext) ([]string, error)                         { return []string{}, nil }
-func (*mockNodeInvoker) Stop(ipc.ServerContext, uint32) error                              { return nil }
-func (*mockNodeInvoker) Suspend(ipc.ServerContext) error                                   { return nil }
-func (*mockNodeInvoker) Uninstall(ipc.ServerContext) error                                 { return nil }
-func (i *mockNodeInvoker) Update(ipc.ServerContext) error                                  { return nil }
-func (*mockNodeInvoker) UpdateTo(ipc.ServerContext, string) error                          { return nil }
+func (*mockNodeInvoker) Reset(call ipc.ServerContext, deadline uint64) error    { return nil }
+func (*mockNodeInvoker) Install(ipc.ServerContext, string) (string, error)      { return "", nil }
+func (*mockNodeInvoker) Refresh(ipc.ServerContext) error                        { return nil }
+func (*mockNodeInvoker) Restart(ipc.ServerContext) error                        { return nil }
+func (*mockNodeInvoker) Resume(ipc.ServerContext) error                         { return nil }
+func (i *mockNodeInvoker) Revert(call ipc.ServerContext) error                  { return nil }
+func (*mockNodeInvoker) Start(ipc.ServerContext) ([]string, error)              { return []string{}, nil }
+func (*mockNodeInvoker) Stop(ipc.ServerContext, uint32) error                   { return nil }
+func (*mockNodeInvoker) Suspend(ipc.ServerContext) error                        { return nil }
+func (*mockNodeInvoker) Uninstall(ipc.ServerContext) error                      { return nil }
+func (i *mockNodeInvoker) Update(ipc.ServerContext) error                       { return nil }
+func (*mockNodeInvoker) UpdateTo(ipc.ServerContext, string) error               { return nil }
 func (i *mockNodeInvoker) SetACL(ipc.ServerContext, security.ACL, string) error { return nil }
 func (i *mockNodeInvoker) GetACL(ipc.ServerContext) (security.ACL, string, error) {
 	return security.ACL{}, "", nil
@@ -91,7 +91,7 @@
 	return &dispatcher{tape: tape, t: t}
 }
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	invoker := ipc.ReflectInvoker(node.NewServerNode(&mockNodeInvoker{tape: d.tape, t: d.t}))
 	return invoker, nil, nil
 }
diff --git a/tools/binary/impl_test.go b/tools/binary/impl_test.go
index 3de1f9a..a924a93 100644
--- a/tools/binary/impl_test.go
+++ b/tools/binary/impl_test.go
@@ -77,7 +77,7 @@
 	return &dispatcher{}
 }
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	invoker := ipc.ReflectInvoker(repository.NewServerBinary(&server{suffix: suffix}))
 	return invoker, nil, nil
 }
diff --git a/tools/mounttable/impl_test.go b/tools/mounttable/impl_test.go
index 4e23910..9dfe601 100644
--- a/tools/mounttable/impl_test.go
+++ b/tools/mounttable/impl_test.go
@@ -56,7 +56,7 @@
 type dispatcher struct {
 }
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	invoker := ipc.ReflectInvoker(mounttable.NewServerMountTable(&server{suffix: suffix}))
 	return invoker, nil, nil
 }
diff --git a/tools/profile/impl_test.go b/tools/profile/impl_test.go
index 99f2562..0bfd27e 100644
--- a/tools/profile/impl_test.go
+++ b/tools/profile/impl_test.go
@@ -79,7 +79,7 @@
 	return &dispatcher{}
 }
 
-func (d *dispatcher) Lookup(suffix, method string) (ipc.Invoker, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
 	invoker := ipc.ReflectInvoker(repository.NewServerProfile(&server{suffix: suffix}))
 	return invoker, nil, nil
 }