veyron/veyron/profiles: reserved name registration
Add reserved name registration to the generic profile. This allows RPC
servers using the generic profile (e.g. those in integration tests) to
service requests for reserved endpoints (e.g. __Glob).
Change-Id: I7bd88fc842dd974557a6a88000de18764ae2041e
diff --git a/profiles/generic.go b/profiles/generic.go
index 421ff22..36ace41 100644
--- a/profiles/generic.go
+++ b/profiles/generic.go
@@ -12,6 +12,10 @@
"veyron.io/veyron/veyron/profiles/internal"
"veyron.io/veyron/veyron/profiles/internal/platform"
_ "veyron.io/veyron/veyron/runtimes/google/rt"
+ "veyron.io/veyron/veyron/services/mgmt/debug"
+
+ // TODO(cnicolaou,ashankar): move this into flags.
+ sflag "veyron.io/veyron/veyron/security/flag"
)
// LocalListenSpec is a ListenSpec for 127.0.0.1.
@@ -49,8 +53,11 @@
}
func (g *generic) Init(rt veyron2.Runtime, _ *config.Publisher) (veyron2.AppCycle, error) {
- rt.Logger().VI(1).Infof("%s", g)
+ log := rt.Logger()
+ log.VI(1).Infof("%s", g)
g.ac = appcycle.New()
+
+ rt.ConfigureReservedName(debug.NewDispatcher(log.LogDir(), sflag.NewAuthorizerOrDie(), rt.VtraceStore()))
return g.ac, nil
}