core: Remove the Principal method of the Runtime interface.
This is part of the runtimeX migration.
Change-Id: Id7747624f46663ee0b793eed248063aa39f864a5
diff --git a/lib/modules/core/proxy.go b/lib/modules/core/proxy.go
index 4f706b3..764dbab 100644
--- a/lib/modules/core/proxy.go
+++ b/lib/modules/core/proxy.go
@@ -24,6 +24,8 @@
if err != nil {
panic(err)
}
+ ctx := r.NewContext()
+
fl, args, err := parseListenFlags(args)
if err != nil {
return fmt.Errorf("failed to parse args: %s", err)
@@ -35,7 +37,7 @@
}
lf := fl.ListenFlags()
- proxy, err := proxy.New(rid, r.Principal(), lf.Addrs[0].Protocol, lf.Addrs[0].Address, "")
+ proxy, err := proxy.New(rid, veyron2.GetPrincipal(ctx), lf.Addrs[0].Protocol, lf.Addrs[0].Address, "")
if err != nil {
return err
}
@@ -47,7 +49,6 @@
fmt.Fprintf(stdout, "PROXY_NAME=%s\n", pname)
if expected > 0 {
defer r.Cleanup()
- ctx := r.NewContext()
pub := publisher.New(ctx, veyron2.GetNamespace(ctx), time.Minute)
defer pub.WaitForStop()
defer pub.Stop()