Reorganize GetMethodTags, Signature, UnresolveStep to be consistent.
Add test for calling Signature() from the client side.
Change-Id: I31eb0b93bcb28dbab064926434449de15345c255
diff --git a/examples/boxes/boxes.vdl.go b/examples/boxes/boxes.vdl.go
index ecdfc2e..00fea43 100644
--- a/examples/boxes/boxes.vdl.go
+++ b/examples/boxes/boxes.vdl.go
@@ -26,23 +26,17 @@
// BoxSignalling allows peers to rendezvous with each other
// BoxSignalling is the interface the client binds and uses.
-// BoxSignalling_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type BoxSignalling_InternalNoTagGetter interface {
-
+// BoxSignalling_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type BoxSignalling_ExcludingUniversal interface {
// Add endpoint information to the signalling server.
Add(Endpoint string, opts ..._gen_ipc.ClientCallOpt) (err error)
// Get endpoint information about a peer.
Get(opts ..._gen_ipc.ClientCallOpt) (reply string, err error)
}
type BoxSignalling interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- BoxSignalling_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ BoxSignalling_ExcludingUniversal
}
// BoxSignallingService is the interface the server implements.
@@ -97,10 +91,6 @@
name string
}
-func (c *clientStubBoxSignalling) GetMethodTags(method string) []interface{} {
- return GetBoxSignallingMethodTags(method)
-}
-
func (__gen_c *clientStubBoxSignalling) Add(Endpoint string, opts ..._gen_ipc.ClientCallOpt) (err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Add", []interface{}{Endpoint}, opts...); err != nil {
@@ -123,9 +113,31 @@
return
}
-func (c *clientStubBoxSignalling) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubBoxSignalling) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubBoxSignalling) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubBoxSignalling) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -141,11 +153,21 @@
service BoxSignallingService
}
-func (s *ServerStubBoxSignalling) GetMethodTags(method string) []interface{} {
- return GetBoxSignallingMethodTags(method)
+func (__gen_s *ServerStubBoxSignalling) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Add":
+ return []interface{}{}, nil
+ case "Get":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubBoxSignalling) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubBoxSignalling) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Add"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -169,8 +191,8 @@
return result, nil
}
-func (s *ServerStubBoxSignalling) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubBoxSignalling) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -197,34 +219,17 @@
return
}
-func GetBoxSignallingMethodTags(method string) []interface{} {
- switch method {
- case "Add":
- return []interface{}{}
- case "Get":
- return []interface{}{}
- default:
- return nil
- }
-}
-
// DrawInterface enables adding a box on another peer
// DrawInterface is the interface the client binds and uses.
-// DrawInterface_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type DrawInterface_InternalNoTagGetter interface {
-
+// DrawInterface_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type DrawInterface_ExcludingUniversal interface {
// Send/Receive a stream of boxes with another peer
Draw(opts ..._gen_ipc.ClientCallOpt) (reply DrawInterfaceDrawStream, err error)
}
type DrawInterface interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- DrawInterface_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ DrawInterface_ExcludingUniversal
}
// DrawInterfaceService is the interface the server implements.
@@ -358,10 +363,6 @@
name string
}
-func (c *clientStubDrawInterface) GetMethodTags(method string) []interface{} {
- return GetDrawInterfaceMethodTags(method)
-}
-
func (__gen_c *clientStubDrawInterface) Draw(opts ..._gen_ipc.ClientCallOpt) (reply DrawInterfaceDrawStream, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Draw", nil, opts...); err != nil {
@@ -371,9 +372,31 @@
return
}
-func (c *clientStubDrawInterface) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubDrawInterface) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubDrawInterface) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubDrawInterface) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -389,11 +412,19 @@
service DrawInterfaceService
}
-func (s *ServerStubDrawInterface) GetMethodTags(method string) []interface{} {
- return GetDrawInterfaceMethodTags(method)
+func (__gen_s *ServerStubDrawInterface) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Draw":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubDrawInterface) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubDrawInterface) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Draw"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{},
@@ -416,8 +447,8 @@
return result, nil
}
-func (s *ServerStubDrawInterface) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubDrawInterface) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -439,12 +470,3 @@
err = __gen_s.service.Draw(call, stream)
return
}
-
-func GetDrawInterfaceMethodTags(method string) []interface{} {
- switch method {
- case "Draw":
- return []interface{}{}
- default:
- return nil
- }
-}
diff --git a/examples/fortune/fortune.vdl.go b/examples/fortune/fortune.vdl.go
index 0f34bd9..e1382b8 100644
--- a/examples/fortune/fortune.vdl.go
+++ b/examples/fortune/fortune.vdl.go
@@ -17,23 +17,17 @@
// Fortune allows clients to Get and Add fortune strings.
// Fortune is the interface the client binds and uses.
-// Fortune_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Fortune_InternalNoTagGetter interface {
-
+// Fortune_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Fortune_ExcludingUniversal interface {
// Get returns a random fortune.
Get(opts ..._gen_ipc.ClientCallOpt) (reply string, err error)
// Add stores a fortune in the set used by Get.
Add(Fortune string, opts ..._gen_ipc.ClientCallOpt) (err error)
}
type Fortune interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Fortune_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Fortune_ExcludingUniversal
}
// FortuneService is the interface the server implements.
@@ -88,10 +82,6 @@
name string
}
-func (c *clientStubFortune) GetMethodTags(method string) []interface{} {
- return GetFortuneMethodTags(method)
-}
-
func (__gen_c *clientStubFortune) Get(opts ..._gen_ipc.ClientCallOpt) (reply string, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Get", nil, opts...); err != nil {
@@ -114,9 +104,31 @@
return
}
-func (c *clientStubFortune) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubFortune) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubFortune) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubFortune) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -132,11 +144,21 @@
service FortuneService
}
-func (s *ServerStubFortune) GetMethodTags(method string) []interface{} {
- return GetFortuneMethodTags(method)
+func (__gen_s *ServerStubFortune) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Get":
+ return []interface{}{security.Label(1)}, nil
+ case "Add":
+ return []interface{}{security.Label(2)}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubFortune) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubFortune) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Add"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -160,8 +182,8 @@
return result, nil
}
-func (s *ServerStubFortune) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubFortune) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -187,14 +209,3 @@
err = __gen_s.service.Add(call, Fortune)
return
}
-
-func GetFortuneMethodTags(method string) []interface{} {
- switch method {
- case "Get":
- return []interface{}{security.Label(1)}
- case "Add":
- return []interface{}{security.Label(2)}
- default:
- return nil
- }
-}
diff --git a/examples/inspector/inspector.vdl.go b/examples/inspector/inspector.vdl.go
index e80b035..67e0b36 100644
--- a/examples/inspector/inspector.vdl.go
+++ b/examples/inspector/inspector.vdl.go
@@ -26,20 +26,15 @@
}
// Inspector is the interface the client binds and uses.
-// Inspector_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Inspector_InternalNoTagGetter interface {
+// Inspector_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Inspector_ExcludingUniversal interface {
Ls(Glob string, opts ..._gen_ipc.ClientCallOpt) (reply InspectorLsStream, err error)
LsDetails(Glob string, opts ..._gen_ipc.ClientCallOpt) (reply InspectorLsDetailsStream, err error)
}
type Inspector interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Inspector_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Inspector_ExcludingUniversal
}
// InspectorService is the interface the server implements.
@@ -199,10 +194,6 @@
name string
}
-func (c *clientStubInspector) GetMethodTags(method string) []interface{} {
- return GetInspectorMethodTags(method)
-}
-
func (__gen_c *clientStubInspector) Ls(Glob string, opts ..._gen_ipc.ClientCallOpt) (reply InspectorLsStream, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Ls", []interface{}{Glob}, opts...); err != nil {
@@ -221,9 +212,31 @@
return
}
-func (c *clientStubInspector) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubInspector) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubInspector) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubInspector) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -239,11 +252,21 @@
service InspectorService
}
-func (s *ServerStubInspector) GetMethodTags(method string) []interface{} {
- return GetInspectorMethodTags(method)
+func (__gen_s *ServerStubInspector) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Ls":
+ return []interface{}{}, nil
+ case "LsDetails":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubInspector) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubInspector) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Ls"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -282,8 +305,8 @@
return result, nil
}
-func (s *ServerStubInspector) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubInspector) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -311,14 +334,3 @@
err = __gen_s.service.LsDetails(call, Glob, stream)
return
}
-
-func GetInspectorMethodTags(method string) []interface{} {
- switch method {
- case "Ls":
- return []interface{}{}
- case "LsDetails":
- return []interface{}{}
- default:
- return nil
- }
-}
diff --git a/examples/rockpaperscissors/service.vdl.go b/examples/rockpaperscissors/service.vdl.go
index a2dc945..cdf2198 100644
--- a/examples/rockpaperscissors/service.vdl.go
+++ b/examples/rockpaperscissors/service.vdl.go
@@ -79,12 +79,9 @@
)
// Judge is the interface the client binds and uses.
-// Judge_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Judge_InternalNoTagGetter interface {
-
+// Judge_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Judge_ExcludingUniversal interface {
// CreateGame creates a new game with the given game options and returns a game
// identifier that can be used by the players to join the game.
CreateGame(Opts GameOptions, opts ..._gen_ipc.ClientCallOpt) (reply GameID, err error)
@@ -92,11 +89,8 @@
Play(ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply JudgePlayStream, err error)
}
type Judge interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Judge_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Judge_ExcludingUniversal
}
// JudgeService is the interface the server implements.
@@ -233,10 +227,6 @@
name string
}
-func (c *clientStubJudge) GetMethodTags(method string) []interface{} {
- return GetJudgeMethodTags(method)
-}
-
func (__gen_c *clientStubJudge) CreateGame(Opts GameOptions, opts ..._gen_ipc.ClientCallOpt) (reply GameID, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "CreateGame", []interface{}{Opts}, opts...); err != nil {
@@ -257,9 +247,31 @@
return
}
-func (c *clientStubJudge) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubJudge) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubJudge) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubJudge) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -275,11 +287,21 @@
service JudgeService
}
-func (s *ServerStubJudge) GetMethodTags(method string) []interface{} {
- return GetJudgeMethodTags(method)
+func (__gen_s *ServerStubJudge) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "CreateGame":
+ return []interface{}{}, nil
+ case "Play":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubJudge) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubJudge) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["CreateGame"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -358,8 +380,8 @@
return result, nil
}
-func (s *ServerStubJudge) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubJudge) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -387,35 +409,18 @@
return
}
-func GetJudgeMethodTags(method string) []interface{} {
- switch method {
- case "CreateGame":
- return []interface{}{}
- case "Play":
- return []interface{}{}
- default:
- return nil
- }
-}
-
// Player can receive challenges from other players.
// Player is the interface the client binds and uses.
-// Player_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Player_InternalNoTagGetter interface {
-
+// Player_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Player_ExcludingUniversal interface {
// Challenge is used by other players to challenge this player to a game. If
// the challenge is accepted, the method returns true.
Challenge(Address string, ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply bool, err error)
}
type Player interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Player_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Player_ExcludingUniversal
}
// PlayerService is the interface the server implements.
@@ -469,10 +474,6 @@
name string
}
-func (c *clientStubPlayer) GetMethodTags(method string) []interface{} {
- return GetPlayerMethodTags(method)
-}
-
func (__gen_c *clientStubPlayer) Challenge(Address string, ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply bool, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Challenge", []interface{}{Address, ID}, opts...); err != nil {
@@ -484,9 +485,31 @@
return
}
-func (c *clientStubPlayer) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubPlayer) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubPlayer) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubPlayer) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -502,11 +525,19 @@
service PlayerService
}
-func (s *ServerStubPlayer) GetMethodTags(method string) []interface{} {
- return GetPlayerMethodTags(method)
+func (__gen_s *ServerStubPlayer) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Challenge":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubPlayer) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubPlayer) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Challenge"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -530,8 +561,8 @@
return result, nil
}
-func (s *ServerStubPlayer) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubPlayer) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -553,30 +584,16 @@
return
}
-func GetPlayerMethodTags(method string) []interface{} {
- switch method {
- case "Challenge":
- return []interface{}{}
- default:
- return nil
- }
-}
-
// ScoreKeeper receives the outcome of games from Judges.
// ScoreKeeper is the interface the client binds and uses.
-// ScoreKeeper_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type ScoreKeeper_InternalNoTagGetter interface {
+// ScoreKeeper_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type ScoreKeeper_ExcludingUniversal interface {
Record(Score ScoreCard, opts ..._gen_ipc.ClientCallOpt) (err error)
}
type ScoreKeeper interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- ScoreKeeper_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ ScoreKeeper_ExcludingUniversal
}
// ScoreKeeperService is the interface the server implements.
@@ -627,10 +644,6 @@
name string
}
-func (c *clientStubScoreKeeper) GetMethodTags(method string) []interface{} {
- return GetScoreKeeperMethodTags(method)
-}
-
func (__gen_c *clientStubScoreKeeper) Record(Score ScoreCard, opts ..._gen_ipc.ClientCallOpt) (err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Record", []interface{}{Score}, opts...); err != nil {
@@ -642,9 +655,31 @@
return
}
-func (c *clientStubScoreKeeper) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubScoreKeeper) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubScoreKeeper) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubScoreKeeper) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -660,11 +695,19 @@
service ScoreKeeperService
}
-func (s *ServerStubScoreKeeper) GetMethodTags(method string) []interface{} {
- return GetScoreKeeperMethodTags(method)
+func (__gen_s *ServerStubScoreKeeper) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Record":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubScoreKeeper) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubScoreKeeper) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Record"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -706,8 +749,8 @@
return result, nil
}
-func (s *ServerStubScoreKeeper) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubScoreKeeper) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -729,33 +772,19 @@
return
}
-func GetScoreKeeperMethodTags(method string) []interface{} {
- switch method {
- case "Record":
- return []interface{}{}
- default:
- return nil
- }
-}
-
// RockPaperScissors is the interface the client binds and uses.
-// RockPaperScissors_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type RockPaperScissors_InternalNoTagGetter interface {
- Judge_InternalNoTagGetter
+// RockPaperScissors_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type RockPaperScissors_ExcludingUniversal interface {
+ Judge_ExcludingUniversal
// Player can receive challenges from other players.
- Player_InternalNoTagGetter
+ Player_ExcludingUniversal
// ScoreKeeper receives the outcome of games from Judges.
- ScoreKeeper_InternalNoTagGetter
+ ScoreKeeper_ExcludingUniversal
}
type RockPaperScissors interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- RockPaperScissors_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ RockPaperScissors_ExcludingUniversal
}
// RockPaperScissorsService is the interface the server implements.
@@ -790,9 +819,9 @@
return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubRockPaperScissors{client: client, name: name}
- stub.Judge_InternalNoTagGetter, _ = BindJudge(name, client)
- stub.Player_InternalNoTagGetter, _ = BindPlayer(name, client)
- stub.ScoreKeeper_InternalNoTagGetter, _ = BindScoreKeeper(name, client)
+ stub.Judge_ExcludingUniversal, _ = BindJudge(name, client)
+ stub.Player_ExcludingUniversal, _ = BindPlayer(name, client)
+ stub.ScoreKeeper_ExcludingUniversal, _ = BindScoreKeeper(name, client)
return stub, nil
}
@@ -812,21 +841,39 @@
// clientStubRockPaperScissors implements RockPaperScissors.
type clientStubRockPaperScissors struct {
- Judge_InternalNoTagGetter
- Player_InternalNoTagGetter
- ScoreKeeper_InternalNoTagGetter
+ Judge_ExcludingUniversal
+ Player_ExcludingUniversal
+ ScoreKeeper_ExcludingUniversal
client _gen_ipc.Client
name string
}
-func (c *clientStubRockPaperScissors) GetMethodTags(method string) []interface{} {
- return GetRockPaperScissorsMethodTags(method)
+func (__gen_c *clientStubRockPaperScissors) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
}
-func (c *clientStubRockPaperScissors) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubRockPaperScissors) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubRockPaperScissors) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -846,17 +893,29 @@
service RockPaperScissorsService
}
-func (s *ServerStubRockPaperScissors) GetMethodTags(method string) []interface{} {
- return GetRockPaperScissorsMethodTags(method)
+func (__gen_s *ServerStubRockPaperScissors) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ if resp, err := __gen_s.ServerStubJudge.GetMethodTags(call, method); resp != nil || err != nil {
+ return resp, err
+ }
+ if resp, err := __gen_s.ServerStubPlayer.GetMethodTags(call, method); resp != nil || err != nil {
+ return resp, err
+ }
+ if resp, err := __gen_s.ServerStubScoreKeeper.GetMethodTags(call, method); resp != nil || err != nil {
+ return resp, err
+ }
+ return nil, nil
}
-func (s *ServerStubRockPaperScissors) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubRockPaperScissors) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.TypeDefs = []_gen_vdl.Any{}
var ss _gen_ipc.ServiceSignature
var firstAdded int
- ss, _ = s.ServerStubJudge.Signature(call)
+ ss, _ = __gen_s.ServerStubJudge.Signature(call)
firstAdded = len(result.TypeDefs)
for k, v := range ss.Methods {
for i, _ := range v.InArgs {
@@ -908,7 +967,7 @@
}
result.TypeDefs = append(result.TypeDefs, d)
}
- ss, _ = s.ServerStubPlayer.Signature(call)
+ ss, _ = __gen_s.ServerStubPlayer.Signature(call)
firstAdded = len(result.TypeDefs)
for k, v := range ss.Methods {
for i, _ := range v.InArgs {
@@ -960,7 +1019,7 @@
}
result.TypeDefs = append(result.TypeDefs, d)
}
- ss, _ = s.ServerStubScoreKeeper.Signature(call)
+ ss, _ = __gen_s.ServerStubScoreKeeper.Signature(call)
firstAdded = len(result.TypeDefs)
for k, v := range ss.Methods {
for i, _ := range v.InArgs {
@@ -1016,8 +1075,8 @@
return result, nil
}
-func (s *ServerStubRockPaperScissors) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubRockPaperScissors) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -1033,16 +1092,3 @@
}
return
}
-
-func GetRockPaperScissorsMethodTags(method string) []interface{} {
- if resp := GetJudgeMethodTags(method); resp != nil {
- return resp
- }
- if resp := GetPlayerMethodTags(method); resp != nil {
- return resp
- }
- if resp := GetScoreKeeperMethodTags(method); resp != nil {
- return resp
- }
- return nil
-}
diff --git a/examples/tunnel/tunnel.vdl.go b/examples/tunnel/tunnel.vdl.go
index 50896f0..fb26dbb 100644
--- a/examples/tunnel/tunnel.vdl.go
+++ b/examples/tunnel/tunnel.vdl.go
@@ -38,12 +38,9 @@
}
// Tunnel is the interface the client binds and uses.
-// Tunnel_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Tunnel_InternalNoTagGetter interface {
-
+// Tunnel_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Tunnel_ExcludingUniversal interface {
// The Forward method is used for network forwarding. All the data sent over
// the byte stream is forwarded to the requested network address and all the
// data received from that network connection is sent back in the reply
@@ -57,11 +54,8 @@
Shell(command string, shellOpts ShellOpts, opts ..._gen_ipc.ClientCallOpt) (reply TunnelShellStream, err error)
}
type Tunnel interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Tunnel_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Tunnel_ExcludingUniversal
}
// TunnelService is the interface the server implements.
@@ -285,10 +279,6 @@
name string
}
-func (c *clientStubTunnel) GetMethodTags(method string) []interface{} {
- return GetTunnelMethodTags(method)
-}
-
func (__gen_c *clientStubTunnel) Forward(network string, address string, opts ..._gen_ipc.ClientCallOpt) (reply TunnelForwardStream, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Forward", []interface{}{network, address}, opts...); err != nil {
@@ -307,9 +297,31 @@
return
}
-func (c *clientStubTunnel) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubTunnel) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubTunnel) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubTunnel) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -325,11 +337,21 @@
service TunnelService
}
-func (s *ServerStubTunnel) GetMethodTags(method string) []interface{} {
- return GetTunnelMethodTags(method)
+func (__gen_s *ServerStubTunnel) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Forward":
+ return []interface{}{security.Label(4)}, nil
+ case "Shell":
+ return []interface{}{security.Label(4)}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubTunnel) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubTunnel) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Forward"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -382,8 +404,8 @@
return result, nil
}
-func (s *ServerStubTunnel) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubTunnel) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -411,14 +433,3 @@
reply, err = __gen_s.service.Shell(call, command, shellOpts, stream)
return
}
-
-func GetTunnelMethodTags(method string) []interface{} {
- switch method {
- case "Forward":
- return []interface{}{security.Label(4)}
- case "Shell":
- return []interface{}{security.Label(4)}
- default:
- return nil
- }
-}
diff --git a/examples/wspr_sample/cache.vdl.go b/examples/wspr_sample/cache.vdl.go
index 08b2122..da23ee0 100644
--- a/examples/wspr_sample/cache.vdl.go
+++ b/examples/wspr_sample/cache.vdl.go
@@ -21,12 +21,9 @@
// A Cache service mimics the memcache interface.
// Cache is the interface the client binds and uses.
-// Cache_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Cache_InternalNoTagGetter interface {
-
+// Cache_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Cache_ExcludingUniversal interface {
// Set sets a value for a key.
Set(key string, value _gen_vdl.Any, opts ..._gen_ipc.ClientCallOpt) (err error)
// Get returns the value for a key. If the value is not found, returns
@@ -69,11 +66,8 @@
MultiGet(opts ..._gen_ipc.ClientCallOpt) (reply CacheMultiGetStream, err error)
}
type Cache interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Cache_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Cache_ExcludingUniversal
}
// CacheService is the interface the server implements.
@@ -245,10 +239,6 @@
name string
}
-func (c *clientStubCache) GetMethodTags(method string) []interface{} {
- return GetCacheMethodTags(method)
-}
-
func (__gen_c *clientStubCache) Set(key string, value _gen_vdl.Any, opts ..._gen_ipc.ClientCallOpt) (err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Set", []interface{}{key, value}, opts...); err != nil {
@@ -445,9 +435,31 @@
return
}
-func (c *clientStubCache) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubCache) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubCache) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubCache) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -463,11 +475,53 @@
service CacheService
}
-func (s *ServerStubCache) GetMethodTags(method string) []interface{} {
- return GetCacheMethodTags(method)
+func (__gen_s *ServerStubCache) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Set":
+ return []interface{}{}, nil
+ case "Get":
+ return []interface{}{}, nil
+ case "GetAsByte":
+ return []interface{}{}, nil
+ case "GetAsInt32":
+ return []interface{}{}, nil
+ case "GetAsInt64":
+ return []interface{}{}, nil
+ case "GetAsUint32":
+ return []interface{}{}, nil
+ case "GetAsUint64":
+ return []interface{}{}, nil
+ case "GetAsFloat32":
+ return []interface{}{}, nil
+ case "GetAsFloat64":
+ return []interface{}{}, nil
+ case "GetAsString":
+ return []interface{}{}, nil
+ case "GetAsBool":
+ return []interface{}{}, nil
+ case "GetAsError":
+ return []interface{}{}, nil
+ case "AsMap":
+ return []interface{}{}, nil
+ case "KeyValuePairs":
+ return []interface{}{}, nil
+ case "MostRecentSet":
+ return []interface{}{}, nil
+ case "KeyPage":
+ return []interface{}{}, nil
+ case "Size":
+ return []interface{}{}, nil
+ case "MultiGet":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubCache) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubCache) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["AsMap"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{},
@@ -636,8 +690,8 @@
return result, nil
}
-func (s *ServerStubCache) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubCache) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -744,46 +798,3 @@
err = __gen_s.service.MultiGet(call, stream)
return
}
-
-func GetCacheMethodTags(method string) []interface{} {
- switch method {
- case "Set":
- return []interface{}{}
- case "Get":
- return []interface{}{}
- case "GetAsByte":
- return []interface{}{}
- case "GetAsInt32":
- return []interface{}{}
- case "GetAsInt64":
- return []interface{}{}
- case "GetAsUint32":
- return []interface{}{}
- case "GetAsUint64":
- return []interface{}{}
- case "GetAsFloat32":
- return []interface{}{}
- case "GetAsFloat64":
- return []interface{}{}
- case "GetAsString":
- return []interface{}{}
- case "GetAsBool":
- return []interface{}{}
- case "GetAsError":
- return []interface{}{}
- case "AsMap":
- return []interface{}{}
- case "KeyValuePairs":
- return []interface{}{}
- case "MostRecentSet":
- return []interface{}{}
- case "KeyPage":
- return []interface{}{}
- case "Size":
- return []interface{}{}
- case "MultiGet":
- return []interface{}{}
- default:
- return nil
- }
-}
diff --git a/examples/wspr_sample/error_thrower.vdl.go b/examples/wspr_sample/error_thrower.vdl.go
index 19dc707..5ca7e3e 100644
--- a/examples/wspr_sample/error_thrower.vdl.go
+++ b/examples/wspr_sample/error_thrower.vdl.go
@@ -15,12 +15,9 @@
// A testing interface with methods that throw various types of errors
// ErrorThrower is the interface the client binds and uses.
-// ErrorThrower_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type ErrorThrower_InternalNoTagGetter interface {
-
+// ErrorThrower_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type ErrorThrower_ExcludingUniversal interface {
// Throws veyron2/vError.Aborted error
ThrowAborted(opts ..._gen_ipc.ClientCallOpt) (err error)
// Throws veyron2/vError.BadArg error
@@ -43,11 +40,8 @@
ListAllBuiltInErrorIDs(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error)
}
type ErrorThrower interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- ErrorThrower_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ ErrorThrower_ExcludingUniversal
}
// ErrorThrowerService is the interface the server implements.
@@ -118,10 +112,6 @@
name string
}
-func (c *clientStubErrorThrower) GetMethodTags(method string) []interface{} {
- return GetErrorThrowerMethodTags(method)
-}
-
func (__gen_c *clientStubErrorThrower) ThrowAborted(opts ..._gen_ipc.ClientCallOpt) (err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "ThrowAborted", nil, opts...); err != nil {
@@ -232,9 +222,31 @@
return
}
-func (c *clientStubErrorThrower) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubErrorThrower) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubErrorThrower) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubErrorThrower) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -250,11 +262,37 @@
service ErrorThrowerService
}
-func (s *ServerStubErrorThrower) GetMethodTags(method string) []interface{} {
- return GetErrorThrowerMethodTags(method)
+func (__gen_s *ServerStubErrorThrower) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "ThrowAborted":
+ return []interface{}{}, nil
+ case "ThrowBadArg":
+ return []interface{}{}, nil
+ case "ThrowBadProtocol":
+ return []interface{}{}, nil
+ case "ThrowInternal":
+ return []interface{}{}, nil
+ case "ThrowNotAuthorized":
+ return []interface{}{}, nil
+ case "ThrowNotFound":
+ return []interface{}{}, nil
+ case "ThrowUnknown":
+ return []interface{}{}, nil
+ case "ThrowGoError":
+ return []interface{}{}, nil
+ case "ThrowCustomStandardError":
+ return []interface{}{}, nil
+ case "ListAllBuiltInErrorIDs":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubErrorThrower) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubErrorThrower) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["ListAllBuiltInErrorIDs"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{},
@@ -324,8 +362,8 @@
return result, nil
}
-func (s *ServerStubErrorThrower) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubErrorThrower) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -391,30 +429,3 @@
reply, err = __gen_s.service.ListAllBuiltInErrorIDs(call)
return
}
-
-func GetErrorThrowerMethodTags(method string) []interface{} {
- switch method {
- case "ThrowAborted":
- return []interface{}{}
- case "ThrowBadArg":
- return []interface{}{}
- case "ThrowBadProtocol":
- return []interface{}{}
- case "ThrowInternal":
- return []interface{}{}
- case "ThrowNotAuthorized":
- return []interface{}{}
- case "ThrowNotFound":
- return []interface{}{}
- case "ThrowUnknown":
- return []interface{}{}
- case "ThrowGoError":
- return []interface{}{}
- case "ThrowCustomStandardError":
- return []interface{}{}
- case "ListAllBuiltInErrorIDs":
- return []interface{}{}
- default:
- return nil
- }
-}
diff --git a/runtimes/google/vsync/vsync.vdl.go b/runtimes/google/vsync/vsync.vdl.go
index 6edb13d..35c2ec1 100644
--- a/runtimes/google/vsync/vsync.vdl.go
+++ b/runtimes/google/vsync/vsync.vdl.go
@@ -72,22 +72,16 @@
// Sync allows a device to GetDeltas from another device.
// Sync is the interface the client binds and uses.
-// Sync_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Sync_InternalNoTagGetter interface {
-
+// Sync_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Sync_ExcludingUniversal interface {
// GetDeltas returns a device's current generation vector and all the missing log records
// when compared to the incoming generation vector.
GetDeltas(In GenVector, ClientID DeviceID, opts ..._gen_ipc.ClientCallOpt) (reply SyncGetDeltasStream, err error)
}
type Sync interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Sync_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Sync_ExcludingUniversal
}
// SyncService is the interface the server implements.
@@ -195,10 +189,6 @@
name string
}
-func (c *clientStubSync) GetMethodTags(method string) []interface{} {
- return GetSyncMethodTags(method)
-}
-
func (__gen_c *clientStubSync) GetDeltas(In GenVector, ClientID DeviceID, opts ..._gen_ipc.ClientCallOpt) (reply SyncGetDeltasStream, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "GetDeltas", []interface{}{In, ClientID}, opts...); err != nil {
@@ -208,9 +198,31 @@
return
}
-func (c *clientStubSync) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubSync) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubSync) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubSync) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -226,11 +238,19 @@
service SyncService
}
-func (s *ServerStubSync) GetMethodTags(method string) []interface{} {
- return GetSyncMethodTags(method)
+func (__gen_s *ServerStubSync) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "GetDeltas":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubSync) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubSync) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["GetDeltas"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -293,8 +313,8 @@
return result, nil
}
-func (s *ServerStubSync) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubSync) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -316,12 +336,3 @@
reply, err = __gen_s.service.GetDeltas(call, In, ClientID, stream)
return
}
-
-func GetSyncMethodTags(method string) []interface{} {
- switch method {
- case "GetDeltas":
- return []interface{}{}
- default:
- return nil
- }
-}
diff --git a/services/mgmt/application/application.vdl.go b/services/mgmt/application/application.vdl.go
index 1ecc32d..1242569 100644
--- a/services/mgmt/application/application.vdl.go
+++ b/services/mgmt/application/application.vdl.go
@@ -23,12 +23,9 @@
// the public Repository interface, it allows to manage the actual
// application metadata.
// Repository is the interface the client binds and uses.
-// Repository_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Repository_InternalNoTagGetter interface {
-
+// Repository_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Repository_ExcludingUniversal interface {
// Repository provides access to application envelopes. An
// application envelope is identified by an application name and an
// application version, which are specified through the veyron name,
@@ -43,7 +40,7 @@
// Further, we envision that there will be special "latest" and
// "release" versions that will be symbolic links whose mapping is
// maintained by a mount table.
- application.Repository_InternalNoTagGetter
+ application.Repository_ExcludingUniversal
// Put adds the given tuple of application version (specified
// through the veyron name suffix) and application envelope to all
// of the given application profiles.
@@ -58,11 +55,8 @@
Remove(Profile string, opts ..._gen_ipc.ClientCallOpt) (err error)
}
type Repository interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Repository_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Repository_ExcludingUniversal
}
// RepositoryService is the interface the server implements.
@@ -120,7 +114,7 @@
return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubRepository{client: client, name: name}
- stub.Repository_InternalNoTagGetter, _ = application.BindRepository(name, client)
+ stub.Repository_ExcludingUniversal, _ = application.BindRepository(name, client)
return stub, nil
}
@@ -138,16 +132,12 @@
// clientStubRepository implements Repository.
type clientStubRepository struct {
- application.Repository_InternalNoTagGetter
+ application.Repository_ExcludingUniversal
client _gen_ipc.Client
name string
}
-func (c *clientStubRepository) GetMethodTags(method string) []interface{} {
- return GetRepositoryMethodTags(method)
-}
-
func (__gen_c *clientStubRepository) Put(Profiles []string, Envelope application.Envelope, opts ..._gen_ipc.ClientCallOpt) (err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Put", []interface{}{Profiles, Envelope}, opts...); err != nil {
@@ -170,9 +160,31 @@
return
}
-func (c *clientStubRepository) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubRepository) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubRepository) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubRepository) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -190,11 +202,24 @@
service RepositoryService
}
-func (s *ServerStubRepository) GetMethodTags(method string) []interface{} {
- return GetRepositoryMethodTags(method)
+func (__gen_s *ServerStubRepository) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ if resp, err := __gen_s.ServerStubRepository.GetMethodTags(call, method); resp != nil || err != nil {
+ return resp, err
+ }
+ switch method {
+ case "Put":
+ return []interface{}{security.Label(2)}, nil
+ case "Remove":
+ return []interface{}{security.Label(2)}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubRepository) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubRepository) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Put"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -225,7 +250,7 @@
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
var ss _gen_ipc.ServiceSignature
var firstAdded int
- ss, _ = s.ServerStubRepository.Signature(call)
+ ss, _ = __gen_s.ServerStubRepository.Signature(call)
firstAdded = len(result.TypeDefs)
for k, v := range ss.Methods {
for i, _ := range v.InArgs {
@@ -281,8 +306,8 @@
return result, nil
}
-func (s *ServerStubRepository) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubRepository) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -308,17 +333,3 @@
err = __gen_s.service.Remove(call, Profile)
return
}
-
-func GetRepositoryMethodTags(method string) []interface{} {
- if resp := application.GetRepositoryMethodTags(method); resp != nil {
- return resp
- }
- switch method {
- case "Put":
- return []interface{}{security.Label(2)}
- case "Remove":
- return []interface{}{security.Label(2)}
- default:
- return nil
- }
-}
diff --git a/services/mgmt/profile/profile.vdl.go b/services/mgmt/profile/profile.vdl.go
index 3e5fcab..543e908 100644
--- a/services/mgmt/profile/profile.vdl.go
+++ b/services/mgmt/profile/profile.vdl.go
@@ -57,17 +57,14 @@
// interface, it allows to access and manage the actual profile
// implementation information.
// Profile is the interface the client binds and uses.
-// Profile_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Profile_InternalNoTagGetter interface {
-
+// Profile_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Profile_ExcludingUniversal interface {
// Profile abstracts a device's ability to run binaries, and hides
// specifics such as operating system, hardware architecture, and the
// set of installed libraries. Profiles describe binaries and devices,
// and are used to match them.
- profile.Profile_InternalNoTagGetter
+ profile.Profile_ExcludingUniversal
// Specification returns the profile specification for the profile
// identified through the veyron name suffix.
Specification(opts ..._gen_ipc.ClientCallOpt) (reply Specification, err error)
@@ -79,11 +76,8 @@
Remove(opts ..._gen_ipc.ClientCallOpt) (err error)
}
type Profile interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Profile_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Profile_ExcludingUniversal
}
// ProfileService is the interface the server implements.
@@ -128,7 +122,7 @@
return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubProfile{client: client, name: name}
- stub.Profile_InternalNoTagGetter, _ = profile.BindProfile(name, client)
+ stub.Profile_ExcludingUniversal, _ = profile.BindProfile(name, client)
return stub, nil
}
@@ -146,16 +140,12 @@
// clientStubProfile implements Profile.
type clientStubProfile struct {
- profile.Profile_InternalNoTagGetter
+ profile.Profile_ExcludingUniversal
client _gen_ipc.Client
name string
}
-func (c *clientStubProfile) GetMethodTags(method string) []interface{} {
- return GetProfileMethodTags(method)
-}
-
func (__gen_c *clientStubProfile) Specification(opts ..._gen_ipc.ClientCallOpt) (reply Specification, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Specification", nil, opts...); err != nil {
@@ -189,9 +179,31 @@
return
}
-func (c *clientStubProfile) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubProfile) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubProfile) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubProfile) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -209,11 +221,26 @@
service ProfileService
}
-func (s *ServerStubProfile) GetMethodTags(method string) []interface{} {
- return GetProfileMethodTags(method)
+func (__gen_s *ServerStubProfile) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ if resp, err := __gen_s.ServerStubProfile.GetMethodTags(call, method); resp != nil || err != nil {
+ return resp, err
+ }
+ switch method {
+ case "Specification":
+ return []interface{}{security.Label(1)}, nil
+ case "Put":
+ return []interface{}{security.Label(2)}, nil
+ case "Remove":
+ return []interface{}{security.Label(2)}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubProfile) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubProfile) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Put"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -262,7 +289,7 @@
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
var ss _gen_ipc.ServiceSignature
var firstAdded int
- ss, _ = s.ServerStubProfile.Signature(call)
+ ss, _ = __gen_s.ServerStubProfile.Signature(call)
firstAdded = len(result.TypeDefs)
for k, v := range ss.Methods {
for i, _ := range v.InArgs {
@@ -318,8 +345,8 @@
return result, nil
}
-func (s *ServerStubProfile) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubProfile) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -350,19 +377,3 @@
err = __gen_s.service.Remove(call)
return
}
-
-func GetProfileMethodTags(method string) []interface{} {
- if resp := profile.GetProfileMethodTags(method); resp != nil {
- return resp
- }
- switch method {
- case "Specification":
- return []interface{}{security.Label(1)}
- case "Put":
- return []interface{}{security.Label(2)}
- case "Remove":
- return []interface{}{security.Label(2)}
- default:
- return nil
- }
-}
diff --git a/services/mgmt/root/root.vdl.go b/services/mgmt/root/root.vdl.go
index 8ed4a72..99c9c2a 100644
--- a/services/mgmt/root/root.vdl.go
+++ b/services/mgmt/root/root.vdl.go
@@ -18,22 +18,16 @@
// Root is an interface to be implemented by a process with root level
// privileges.
// Root is the interface the client binds and uses.
-// Root_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Root_InternalNoTagGetter interface {
-
+// Root_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Root_ExcludingUniversal interface {
// Reset waits for the given deadline (in milliseconds) and then
// restars the host node machine.
Reset(Deadline uint64, opts ..._gen_ipc.ClientCallOpt) (err error)
}
type Root interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Root_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Root_ExcludingUniversal
}
// RootService is the interface the server implements.
@@ -87,10 +81,6 @@
name string
}
-func (c *clientStubRoot) GetMethodTags(method string) []interface{} {
- return GetRootMethodTags(method)
-}
-
func (__gen_c *clientStubRoot) Reset(Deadline uint64, opts ..._gen_ipc.ClientCallOpt) (err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Reset", []interface{}{Deadline}, opts...); err != nil {
@@ -102,9 +92,31 @@
return
}
-func (c *clientStubRoot) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubRoot) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubRoot) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubRoot) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -120,11 +132,19 @@
service RootService
}
-func (s *ServerStubRoot) GetMethodTags(method string) []interface{} {
- return GetRootMethodTags(method)
+func (__gen_s *ServerStubRoot) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Reset":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubRoot) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubRoot) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Reset"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -141,8 +161,8 @@
return result, nil
}
-func (s *ServerStubRoot) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubRoot) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -163,12 +183,3 @@
err = __gen_s.service.Reset(call, Deadline)
return
}
-
-func GetRootMethodTags(method string) []interface{} {
- switch method {
- case "Reset":
- return []interface{}{}
- default:
- return nil
- }
-}
diff --git a/services/mounttable/lib/collection_test.vdl.go b/services/mounttable/lib/collection_test.vdl.go
index fe1dea3..a3d516c 100644
--- a/services/mounttable/lib/collection_test.vdl.go
+++ b/services/mounttable/lib/collection_test.vdl.go
@@ -14,12 +14,9 @@
)
// Collection is the interface the client binds and uses.
-// Collection_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Collection_InternalNoTagGetter interface {
-
+// Collection_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Collection_ExcludingUniversal interface {
// Export sets the value for a name. Overwrite controls the behavior when
// an entry exists, if Overwrite is true, then the binding is replaced,
// otherwise the call fails with an error. The Val must be no larger than
@@ -30,11 +27,8 @@
Lookup(opts ..._gen_ipc.ClientCallOpt) (reply []byte, err error)
}
type Collection interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Collection_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Collection_ExcludingUniversal
}
// CollectionService is the interface the server implements.
@@ -93,10 +87,6 @@
name string
}
-func (c *clientStubCollection) GetMethodTags(method string) []interface{} {
- return GetCollectionMethodTags(method)
-}
-
func (__gen_c *clientStubCollection) Export(Val string, Overwrite bool, opts ..._gen_ipc.ClientCallOpt) (err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Export", []interface{}{Val, Overwrite}, opts...); err != nil {
@@ -119,9 +109,31 @@
return
}
-func (c *clientStubCollection) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubCollection) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubCollection) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubCollection) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -137,11 +149,21 @@
service CollectionService
}
-func (s *ServerStubCollection) GetMethodTags(method string) []interface{} {
- return GetCollectionMethodTags(method)
+func (__gen_s *ServerStubCollection) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Export":
+ return []interface{}{}, nil
+ case "Lookup":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubCollection) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubCollection) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Export"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -166,8 +188,8 @@
return result, nil
}
-func (s *ServerStubCollection) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubCollection) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -193,14 +215,3 @@
reply, err = __gen_s.service.Lookup(call)
return
}
-
-func GetCollectionMethodTags(method string) []interface{} {
- switch method {
- case "Export":
- return []interface{}{}
- case "Lookup":
- return []interface{}{}
- default:
- return nil
- }
-}
diff --git a/services/store/raw/service.vdl.go b/services/store/raw/service.vdl.go
index ce47119..6f22c54 100644
--- a/services/store/raw/service.vdl.go
+++ b/services/store/raw/service.vdl.go
@@ -54,26 +54,20 @@
// Store defines a raw interface for the Veyron store. Mutations can be received
// via the Watcher interface, and committed via PutMutation.
// Store is the interface the client binds and uses.
-// Store_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Store_InternalNoTagGetter interface {
-
+// Store_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type Store_ExcludingUniversal interface {
// Watcher allows a client to receive updates for changes to objects
// that match a query. See the package comments for details.
- watch.Watcher_InternalNoTagGetter
+ watch.Watcher_ExcludingUniversal
// PutMutations atomically commits a stream of Mutations when the stream is
// closed. Mutations are not committed if the request is cancelled before
// the stream has been closed.
PutMutations(opts ..._gen_ipc.ClientCallOpt) (reply StorePutMutationsStream, err error)
}
type Store interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Store_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ Store_ExcludingUniversal
}
// StoreService is the interface the server implements.
@@ -176,7 +170,7 @@
return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubStore{client: client, name: name}
- stub.Watcher_InternalNoTagGetter, _ = watch.BindWatcher(name, client)
+ stub.Watcher_ExcludingUniversal, _ = watch.BindWatcher(name, client)
return stub, nil
}
@@ -194,16 +188,12 @@
// clientStubStore implements Store.
type clientStubStore struct {
- watch.Watcher_InternalNoTagGetter
+ watch.Watcher_ExcludingUniversal
client _gen_ipc.Client
name string
}
-func (c *clientStubStore) GetMethodTags(method string) []interface{} {
- return GetStoreMethodTags(method)
-}
-
func (__gen_c *clientStubStore) PutMutations(opts ..._gen_ipc.ClientCallOpt) (reply StorePutMutationsStream, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "PutMutations", nil, opts...); err != nil {
@@ -213,9 +203,31 @@
return
}
-func (c *clientStubStore) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubStore) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubStore) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubStore) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -233,11 +245,22 @@
service StoreService
}
-func (s *ServerStubStore) GetMethodTags(method string) []interface{} {
- return GetStoreMethodTags(method)
+func (__gen_s *ServerStubStore) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ if resp, err := __gen_s.ServerStubWatcher.GetMethodTags(call, method); resp != nil || err != nil {
+ return resp, err
+ }
+ switch method {
+ case "PutMutations":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubStore) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubStore) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["PutMutations"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{},
@@ -274,7 +297,7 @@
}
var ss _gen_ipc.ServiceSignature
var firstAdded int
- ss, _ = s.ServerStubWatcher.Signature(call)
+ ss, _ = __gen_s.ServerStubWatcher.Signature(call)
firstAdded = len(result.TypeDefs)
for k, v := range ss.Methods {
for i, _ := range v.InArgs {
@@ -330,8 +353,8 @@
return result, nil
}
-func (s *ServerStubStore) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubStore) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -353,15 +376,3 @@
err = __gen_s.service.PutMutations(call, stream)
return
}
-
-func GetStoreMethodTags(method string) []interface{} {
- if resp := watch.GetWatcherMethodTags(method); resp != nil {
- return resp
- }
- switch method {
- case "PutMutations":
- return []interface{}{}
- default:
- return nil
- }
-}
diff --git a/tools/vrpc/test_base/test_base.vdl.go b/tools/vrpc/test_base/test_base.vdl.go
index c9115d3..b3fcdc5 100644
--- a/tools/vrpc/test_base/test_base.vdl.go
+++ b/tools/vrpc/test_base/test_base.vdl.go
@@ -19,12 +19,9 @@
}
// TypeTester is the interface the client binds and uses.
-// TypeTester_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type TypeTester_InternalNoTagGetter interface {
-
+// TypeTester_ExcludingUniversal is the interface without internal framework-added methods
+// to enable embedding without method collisions. Not to be used directly by clients.
+type TypeTester_ExcludingUniversal interface {
// Methods to test support for generic types.
Bool(I1 bool, opts ..._gen_ipc.ClientCallOpt) (reply bool, err error)
Float32(I1 float32, opts ..._gen_ipc.ClientCallOpt) (reply float32, err error)
@@ -51,11 +48,8 @@
StreamingOutput(NumStreamItems int32, StreamItem bool, opts ..._gen_ipc.ClientCallOpt) (reply TypeTesterStreamingOutputStream, err error)
}
type TypeTester interface {
- _gen_vdl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- TypeTester_InternalNoTagGetter
+ _gen_ipc.UniversalServiceMethods
+ TypeTester_ExcludingUniversal
}
// TypeTesterService is the interface the server implements.
@@ -184,10 +178,6 @@
name string
}
-func (c *clientStubTypeTester) GetMethodTags(method string) []interface{} {
- return GetTypeTesterMethodTags(method)
-}
-
func (__gen_c *clientStubTypeTester) Bool(I1 bool, opts ..._gen_ipc.ClientCallOpt) (reply bool, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Bool", []interface{}{I1}, opts...); err != nil {
@@ -406,9 +396,31 @@
return
}
-func (c *clientStubTypeTester) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+func (__gen_c *clientStubTypeTester) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubTypeTester) Signature(opts ..._gen_ipc.ClientCallOpt) (reply _gen_ipc.ServiceSignature, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Signature", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubTypeTester) GetMethodTags(method string, opts ..._gen_ipc.ClientCallOpt) (reply []interface{}, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "GetMethodTags", []interface{}{method}, opts...); err != nil {
return
}
if ierr := call.Finish(&reply, &err); ierr != nil {
@@ -424,11 +436,57 @@
service TypeTesterService
}
-func (s *ServerStubTypeTester) GetMethodTags(method string) []interface{} {
- return GetTypeTesterMethodTags(method)
+func (__gen_s *ServerStubTypeTester) GetMethodTags(call _gen_ipc.ServerCall, method string) ([]interface{}, error) {
+ // TODO(bprosnitz) GetMethodTags() will be replaces with Signature().
+ // Note: This exhibits some weird behavior like returning a nil error if the method isn't found.
+ // This will change when it is replaced with Signature().
+ switch method {
+ case "Bool":
+ return []interface{}{}, nil
+ case "Float32":
+ return []interface{}{}, nil
+ case "Float64":
+ return []interface{}{}, nil
+ case "Int32":
+ return []interface{}{}, nil
+ case "Int64":
+ return []interface{}{}, nil
+ case "String":
+ return []interface{}{}, nil
+ case "Byte":
+ return []interface{}{}, nil
+ case "UInt32":
+ return []interface{}{}, nil
+ case "UInt64":
+ return []interface{}{}, nil
+ case "InputArray":
+ return []interface{}{}, nil
+ case "InputMap":
+ return []interface{}{}, nil
+ case "InputSlice":
+ return []interface{}{}, nil
+ case "InputStruct":
+ return []interface{}{}, nil
+ case "OutputArray":
+ return []interface{}{}, nil
+ case "OutputMap":
+ return []interface{}{}, nil
+ case "OutputSlice":
+ return []interface{}{}, nil
+ case "OutputStruct":
+ return []interface{}{}, nil
+ case "NoArguments":
+ return []interface{}{}, nil
+ case "MultipleArguments":
+ return []interface{}{}, nil
+ case "StreamingOutput":
+ return []interface{}{}, nil
+ default:
+ return nil, nil
+ }
}
-func (s *ServerStubTypeTester) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+func (__gen_s *ServerStubTypeTester) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Bool"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
@@ -612,8 +670,8 @@
return result, nil
}
-func (s *ServerStubTypeTester) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+func (__gen_s *ServerStubTypeTester) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := __gen_s.service.(_gen_ipc.Unresolver); ok {
return unresolver.UnresolveStep(call)
}
if call.Server() == nil {
@@ -730,50 +788,3 @@
err = __gen_s.service.StreamingOutput(call, NumStreamItems, StreamItem, stream)
return
}
-
-func GetTypeTesterMethodTags(method string) []interface{} {
- switch method {
- case "Bool":
- return []interface{}{}
- case "Float32":
- return []interface{}{}
- case "Float64":
- return []interface{}{}
- case "Int32":
- return []interface{}{}
- case "Int64":
- return []interface{}{}
- case "String":
- return []interface{}{}
- case "Byte":
- return []interface{}{}
- case "UInt32":
- return []interface{}{}
- case "UInt64":
- return []interface{}{}
- case "InputArray":
- return []interface{}{}
- case "InputMap":
- return []interface{}{}
- case "InputSlice":
- return []interface{}{}
- case "InputStruct":
- return []interface{}{}
- case "OutputArray":
- return []interface{}{}
- case "OutputMap":
- return []interface{}{}
- case "OutputSlice":
- return []interface{}{}
- case "OutputStruct":
- return []interface{}{}
- case "NoArguments":
- return []interface{}{}
- case "MultipleArguments":
- return []interface{}{}
- case "StreamingOutput":
- return []interface{}{}
- default:
- return nil
- }
-}