vdl: Remove rpc.BindOpt from generated code.
While cleaning up the Glossary on our website I realized
that "BindOpt", an old relic that makes no sense in the *context.T
world, is still lying around.
This commit removes usage of BindOpt from VDL generated code.
Once this (and related commits) is in, I intend to remove the BindOpt
interface from v.io/v23/rpc.
MultiPart: 1/4
Change-Id: I1933e0ea8b4793a97f71722c73b7b90e599af3ce
diff --git a/services/mgmt/device/config.vdl.go b/services/mgmt/device/config.vdl.go
index e2b60bd..769efa9 100644
--- a/services/mgmt/device/config.vdl.go
+++ b/services/mgmt/device/config.vdl.go
@@ -30,31 +30,17 @@
}
// ConfigClient returns a client stub for Config.
-func ConfigClient(name string, opts ...rpc.BindOpt) ConfigClientStub {
- var client rpc.Client
- for _, opt := range opts {
- if clientOpt, ok := opt.(rpc.Client); ok {
- client = clientOpt
- }
- }
- return implConfigClientStub{name, client}
+func ConfigClient(name string) ConfigClientStub {
+ return implConfigClientStub{name}
}
type implConfigClientStub struct {
- name string
- client rpc.Client
-}
-
-func (c implConfigClientStub) c(ctx *context.T) rpc.Client {
- if c.client != nil {
- return c.client
- }
- return v23.GetClient(ctx)
+ name string
}
func (c implConfigClientStub) Set(ctx *context.T, i0 string, i1 string, opts ...rpc.CallOpt) (err error) {
var call rpc.ClientCall
- if call, err = c.c(ctx).StartCall(ctx, c.name, "Set", []interface{}{i0, i1}, opts...); err != nil {
+ if call, err = v23.GetClient(ctx).StartCall(ctx, c.name, "Set", []interface{}{i0, i1}, opts...); err != nil {
return
}
err = call.Finish()