veyron2/ipc/model.go: Remove method argument from Lookup
This change removes the 'method' argument from the Dispatcher's Lookup
method. It is not used anywhere in a non-trivial way and we don't have
any plan to use it for anything.
Change-Id: I56910d1e863b90b14a800bafb91e46819c3a7fe6
diff --git a/runtimes/google/ipc/flow_test.go b/runtimes/google/ipc/flow_test.go
index 4031966..703a44f 100644
--- a/runtimes/google/ipc/flow_test.go
+++ b/runtimes/google/ipc/flow_test.go
@@ -60,7 +60,7 @@
newInvoker func(suffix string) ipc.Invoker
}
-func (td testDisp) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
+func (td testDisp) Lookup(suffix 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 857b2e2..b9ab62a 100644
--- a/runtimes/google/ipc/full_test.go
+++ b/runtimes/google/ipc/full_test.go
@@ -139,7 +139,7 @@
type testServerDisp struct{ server interface{} }
-func (t testServerDisp) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
+func (t testServerDisp) Lookup(suffix 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
@@ -666,7 +666,7 @@
}
// Implements ipc.Dispatcher
-func (s *dischargeImpetusTester) Lookup(_, _ string) (interface{}, security.Authorizer, error) {
+func (s *dischargeImpetusTester) Lookup(_ string) (interface{}, security.Authorizer, error) {
return ipc.ReflectInvoker(dischargeImpetusServer{s}), testServerAuthorizer{}, nil
}
diff --git a/runtimes/google/ipc/glob.go b/runtimes/google/ipc/glob.go
index 9d959f9..9dba1e4 100644
--- a/runtimes/google/ipc/glob.go
+++ b/runtimes/google/ipc/glob.go
@@ -82,7 +82,7 @@
if disp == nil {
return nil, verror.NoExistf("ipc: no dispatcher for %q.%s", ctx.Suffix(), ctx.Method())
}
- obj, auth, err := disp.Lookup(ctx.Suffix(), ctx.Method())
+ obj, auth, err := disp.Lookup(ctx.Suffix())
switch {
case err != nil:
return nil, err
@@ -117,7 +117,7 @@
if disp == nil {
return ipc.MethodSig{}, verror.NoExistf("ipc: no such method %q", ctx.Method())
}
- obj, auth, err := disp.Lookup(ctx.Suffix(), ctx.Method())
+ obj, auth, err := disp.Lookup(ctx.Suffix())
switch {
case err != nil:
return ipc.MethodSig{}, err
@@ -181,6 +181,7 @@
return err
}
disp := i.dispNormal
+ call.M.Method = ipc.GlobMethod
call.M.MethodTags = []interface{}{security.ResolveLabel}
if naming.IsReserved(i.receiver) || (i.receiver == "" && naming.IsReserved(pattern)) {
disp = i.dispReserved
@@ -199,7 +200,7 @@
vlog.Error(err)
return err
}
- obj, auth, err := disp.Lookup(call.Suffix(), ipc.GlobMethod)
+ obj, auth, err := disp.Lookup(call.Suffix())
switch {
case err != nil:
return err
diff --git a/runtimes/google/ipc/glob_test.go b/runtimes/google/ipc/glob_test.go
index b34ce5d..5d497e8 100644
--- a/runtimes/google/ipc/glob_test.go
+++ b/runtimes/google/ipc/glob_test.go
@@ -173,7 +173,7 @@
tree *node
}
-func (d *disp) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
+func (d *disp) Lookup(suffix string) (interface{}, security.Authorizer, error) {
elems := strings.Split(suffix, "/")
if len(elems) != 0 && elems[0] == "muah" {
// Infinite space. Each node has one child named "ha".
diff --git a/runtimes/google/ipc/server.go b/runtimes/google/ipc/server.go
index 00e0688..abd5986 100644
--- a/runtimes/google/ipc/server.go
+++ b/runtimes/google/ipc/server.go
@@ -837,7 +837,7 @@
disp = fs.server.dispReserved
}
if disp != nil {
- obj, auth, err := disp.Lookup(suffix, *method)
+ obj, auth, err := disp.Lookup(suffix)
switch {
case err != nil:
return nil, nil, verror.Convert(err)
diff --git a/runtimes/google/naming/namespace/all_test.go b/runtimes/google/naming/namespace/all_test.go
index e40b1f3..645050a 100644
--- a/runtimes/google/naming/namespace/all_test.go
+++ b/runtimes/google/naming/namespace/all_test.go
@@ -128,7 +128,7 @@
type dispatcher struct{}
-func (d *dispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
+func (d *dispatcher) Lookup(suffix string) (interface{}, security.Authorizer, error) {
return &testServer{suffix}, allowEveryoneAuthorizer{}, nil
}