core: Compelete the runtimex->runtime transition by renaming everything to non-x variants.

Change-Id: I0a4b0585499b7cddabd553cbc4d96d2abe92cd63
diff --git a/profiles/chrome/chromeinit.go b/profiles/chrome/chromeinit.go
index 9fad3ae..9f4ace2 100644
--- a/profiles/chrome/chromeinit.go
+++ b/profiles/chrome/chromeinit.go
@@ -26,7 +26,7 @@
 	commonFlags = flags.CreateAndRegister(flag.CommandLine, flags.Runtime)
 }
 
-func Init(ctx *context.T) (veyron2.RuntimeX, *context.T, veyron2.Shutdown, error) {
+func Init(ctx *context.T) (veyron2.Runtime, *context.T, veyron2.Shutdown, error) {
 	if err := internal.ParseFlags(commonFlags); err != nil {
 		return nil, nil, nil, err
 	}
diff --git a/profiles/fake/fake.go b/profiles/fake/fake.go
index a91374f..ab90ff3 100644
--- a/profiles/fake/fake.go
+++ b/profiles/fake/fake.go
@@ -11,6 +11,6 @@
 	veyron2.RegisterProfileInit(Init)
 }
 
-func Init(ctx *context.T) (veyron2.RuntimeX, *context.T, veyron2.Shutdown, error) {
+func Init(ctx *context.T) (veyron2.Runtime, *context.T, veyron2.Shutdown, error) {
 	return fake.Init(ctx)
 }
diff --git a/profiles/gce/initx.go b/profiles/gce/init.go
similarity index 95%
rename from profiles/gce/initx.go
rename to profiles/gce/init.go
index 191e8cf..6c47b7d 100644
--- a/profiles/gce/initx.go
+++ b/profiles/gce/init.go
@@ -35,7 +35,7 @@
 	commonFlags = flags.CreateAndRegister(flag.CommandLine, flags.Runtime, flags.Listen)
 }
 
-func Init(ctx *context.T) (veyron2.RuntimeX, *context.T, veyron2.Shutdown, error) {
+func Init(ctx *context.T) (veyron2.Runtime, *context.T, veyron2.Shutdown, error) {
 	if !gce.RunningOnGCE() {
 		return nil, nil, nil, fmt.Errorf("GCE profile used on a non-GCE system")
 	}
diff --git a/profiles/genericinit.go b/profiles/genericinit.go
index 695ebfc..b071c31 100644
--- a/profiles/genericinit.go
+++ b/profiles/genericinit.go
@@ -27,7 +27,7 @@
 	commonFlags = flags.CreateAndRegister(flag.CommandLine, flags.Runtime)
 }
 
-func Init(ctx *context.T) (veyron2.RuntimeX, *context.T, veyron2.Shutdown, error) {
+func Init(ctx *context.T) (veyron2.Runtime, *context.T, veyron2.Shutdown, error) {
 	if err := internal.ParseFlags(commonFlags); err != nil {
 		return nil, nil, nil, err
 	}
diff --git a/profiles/roaming/roaminginit.go b/profiles/roaming/roaminginit.go
index bc2cb4b..48350e4 100644
--- a/profiles/roaming/roaminginit.go
+++ b/profiles/roaming/roaminginit.go
@@ -48,7 +48,7 @@
 	commonFlags = flags.CreateAndRegister(flag.CommandLine, flags.Runtime, flags.Listen)
 }
 
-func Init(ctx *context.T) (veyron2.RuntimeX, *context.T, veyron2.Shutdown, error) {
+func Init(ctx *context.T) (veyron2.Runtime, *context.T, veyron2.Shutdown, error) {
 	if err := internal.ParseFlags(commonFlags); err != nil {
 		return nil, nil, nil, err
 	}
@@ -130,7 +130,7 @@
 // monitorNetworkSettings will monitor network configuration changes and
 // publish subsequent Settings to reflect any changes detected.
 func monitorNetworkSettingsX(
-	runtime *grt.RuntimeX,
+	runtime *grt.Runtime,
 	ctx *context.T,
 	watcher netconfig.NetConfigWatcher,
 	prev netstate.AddrList,
diff --git a/profiles/static/staticinit.go b/profiles/static/staticinit.go
index a2dba6b..2532210 100644
--- a/profiles/static/staticinit.go
+++ b/profiles/static/staticinit.go
@@ -32,7 +32,7 @@
 	commonFlags = flags.CreateAndRegister(flag.CommandLine, flags.Runtime, flags.Listen)
 }
 
-func Init(ctx *context.T) (veyron2.RuntimeX, *context.T, veyron2.Shutdown, error) {
+func Init(ctx *context.T) (veyron2.Runtime, *context.T, veyron2.Shutdown, error) {
 	if err := internal.ParseFlags(commonFlags); err != nil {
 		return nil, nil, nil, err
 	}
diff --git a/runtimes/google/rt/mgmtx.go b/runtimes/google/rt/mgmt.go
similarity index 91%
rename from runtimes/google/rt/mgmtx.go
rename to runtimes/google/rt/mgmt.go
index 8795bc2..ca0f7e3 100644
--- a/runtimes/google/rt/mgmtx.go
+++ b/runtimes/google/rt/mgmt.go
@@ -14,7 +14,7 @@
 	"v.io/core/veyron/lib/exec"
 )
 
-func (rt *RuntimeX) initMgmt(ctx *context.T, appCycle veyron2.AppCycle, handle *exec.ChildHandle) error {
+func (rt *Runtime) initMgmt(ctx *context.T, appCycle veyron2.AppCycle, handle *exec.ChildHandle) error {
 	// Do not initialize the mgmt runtime if the process has not
 	// been started through the veyron exec library by a device
 	// manager.
@@ -77,7 +77,7 @@
 	return &ipc.ListenSpec{Addrs: ipc.ListenAddrs{{protocol, address}}}, nil
 }
 
-func (rt *RuntimeX) callbackToParent(ctx *context.T, parentName, myName string) error {
+func (rt *Runtime) callbackToParent(ctx *context.T, parentName, myName string) error {
 	ctx, _ = context.WithTimeout(ctx, time.Minute)
 	call, err := rt.GetClient(ctx).StartCall(ctx, parentName, "Set", []interface{}{mgmt.AppCycleManagerConfigKey, myName}, options.NoResolve{})
 
diff --git a/runtimes/google/rt/runtimex.go b/runtimes/google/rt/runtime.go
similarity index 84%
rename from runtimes/google/rt/runtimex.go
rename to runtimes/google/rt/runtime.go
index 56a7bd8..b74bc10 100644
--- a/runtimes/google/rt/runtimex.go
+++ b/runtimes/google/rt/runtime.go
@@ -51,10 +51,10 @@
 
 type vtraceDependency struct{}
 
-// RuntimeX implements the veyron2.RuntimeX interface.
+// Runtime implements the veyron2.Runtime interface.
 // Please see the interface definition for documentation of the
 // individiual methods.
-type RuntimeX struct {
+type Runtime struct {
 	deps *dependency.Graph
 }
 
@@ -65,8 +65,8 @@
 
 // TODO(mattr,suharshs): Decide if ROpts would be better than this.
 func Init(ctx *context.T, appCycle veyron2.AppCycle, protocols []string, listenSpec *ipc.ListenSpec, flags flags.RuntimeFlags,
-	reservedDispatcher ipc.Dispatcher, dispatcherOpts ...ipc.ServerOpt) (*RuntimeX, *context.T, veyron2.Shutdown, error) {
-	r := &RuntimeX{deps: dependency.NewGraph()}
+	reservedDispatcher ipc.Dispatcher, dispatcherOpts ...ipc.ServerOpt) (*Runtime, *context.T, veyron2.Shutdown, error) {
+	r := &Runtime{deps: dependency.NewGraph()}
 
 	handle, err := exec.GetChildHandle()
 	switch err {
@@ -177,7 +177,7 @@
 	return r, ctx, r.shutdown, nil
 }
 
-func (r *RuntimeX) addChild(ctx *context.T, me interface{}, stop func(), dependsOn ...interface{}) error {
+func (r *Runtime) addChild(ctx *context.T, me interface{}, stop func(), dependsOn ...interface{}) error {
 	if err := r.deps.Depend(me, dependsOn...); err != nil {
 		stop()
 		return err
@@ -192,18 +192,18 @@
 	return nil
 }
 
-func (r *RuntimeX) shutdown() {
+func (r *Runtime) shutdown() {
 	r.deps.CloseAndWaitForAll()
 	vlog.FlushLog()
 }
 
 // initLogging configures logging for the runtime. It needs to be called after
 // flag.Parse and after signal handling has been initialized.
-func (r *RuntimeX) initLogging(ctx *context.T) error {
+func (r *Runtime) initLogging(ctx *context.T) error {
 	return vlog.ConfigureLibraryLoggerFromFlags()
 }
 
-func (r *RuntimeX) initSignalHandling(ctx *context.T) {
+func (r *Runtime) initSignalHandling(ctx *context.T) {
 	// TODO(caprita): Given that our device manager implementation is to
 	// kill all child apps when the device manager dies, we should
 	// enable SIGHUP on apps by default.
@@ -228,11 +228,11 @@
 	})
 }
 
-func (*RuntimeX) NewEndpoint(ep string) (naming.Endpoint, error) {
+func (*Runtime) NewEndpoint(ep string) (naming.Endpoint, error) {
 	return inaming.NewEndpoint(ep)
 }
 
-func (r *RuntimeX) NewServer(ctx *context.T, opts ...ipc.ServerOpt) (ipc.Server, error) {
+func (r *Runtime) NewServer(ctx *context.T, opts ...ipc.ServerOpt) (ipc.Server, error) {
 	// Create a new RoutingID (and StreamManager) for each server.
 	sm, err := newStreamManager()
 	if err != nil {
@@ -277,7 +277,7 @@
 	return sm, nil
 }
 
-func (r *RuntimeX) setNewStreamManager(ctx *context.T, opts ...stream.ManagerOpt) (*context.T, stream.Manager, error) {
+func (r *Runtime) setNewStreamManager(ctx *context.T, opts ...stream.ManagerOpt) (*context.T, stream.Manager, error) {
 	sm, err := newStreamManager(opts...)
 	newctx := context.WithValue(ctx, streamManagerKey, sm)
 	if err = r.addChild(ctx, sm, sm.Shutdown); err != nil {
@@ -286,7 +286,7 @@
 	return newctx, sm, err
 }
 
-func (r *RuntimeX) SetNewStreamManager(ctx *context.T, opts ...stream.ManagerOpt) (*context.T, stream.Manager, error) {
+func (r *Runtime) SetNewStreamManager(ctx *context.T, opts ...stream.ManagerOpt) (*context.T, stream.Manager, error) {
 	newctx, sm, err := r.setNewStreamManager(ctx, opts...)
 	if err != nil {
 		return ctx, nil, err
@@ -300,12 +300,12 @@
 	return newctx, sm, nil
 }
 
-func (*RuntimeX) GetStreamManager(ctx *context.T) stream.Manager {
+func (*Runtime) GetStreamManager(ctx *context.T) stream.Manager {
 	cl, _ := ctx.Value(streamManagerKey).(stream.Manager)
 	return cl
 }
 
-func (r *RuntimeX) SetPrincipal(ctx *context.T, principal security.Principal) (*context.T, error) {
+func (r *Runtime) SetPrincipal(ctx *context.T, principal security.Principal) (*context.T, error) {
 	var err error
 	newctx := ctx
 
@@ -328,12 +328,12 @@
 	return newctx, nil
 }
 
-func (*RuntimeX) GetPrincipal(ctx *context.T) security.Principal {
+func (*Runtime) GetPrincipal(ctx *context.T) security.Principal {
 	p, _ := ctx.Value(principalKey).(security.Principal)
 	return p
 }
 
-func (r *RuntimeX) SetNewClient(ctx *context.T, opts ...ipc.ClientOpt) (*context.T, ipc.Client, error) {
+func (r *Runtime) SetNewClient(ctx *context.T, opts ...ipc.ClientOpt) (*context.T, ipc.Client, error) {
 	otherOpts := append([]ipc.ClientOpt{}, opts...)
 
 	// TODO(mattr, suharshs):  Currently there are a lot of things that can come in as opts.
@@ -360,12 +360,12 @@
 	return newctx, client, err
 }
 
-func (*RuntimeX) GetClient(ctx *context.T) ipc.Client {
+func (*Runtime) GetClient(ctx *context.T) ipc.Client {
 	cl, _ := ctx.Value(clientKey).(ipc.Client)
 	return cl
 }
 
-func (*RuntimeX) setNewNamespace(ctx *context.T, roots ...string) (*context.T, naming.Namespace, error) {
+func (*Runtime) setNewNamespace(ctx *context.T, roots ...string) (*context.T, naming.Namespace, error) {
 	ns, err := namespace.New(roots...)
 	// TODO(mattr): Copy cache settings.
 	if err == nil {
@@ -374,7 +374,7 @@
 	return ctx, ns, err
 }
 
-func (r *RuntimeX) SetNewNamespace(ctx *context.T, roots ...string) (*context.T, naming.Namespace, error) {
+func (r *Runtime) SetNewNamespace(ctx *context.T, roots ...string) (*context.T, naming.Namespace, error) {
 	newctx, ns, err := r.setNewNamespace(ctx, roots...)
 	if err != nil {
 		return ctx, nil, err
@@ -389,12 +389,12 @@
 	return newctx, ns, err
 }
 
-func (*RuntimeX) GetNamespace(ctx *context.T) naming.Namespace {
+func (*Runtime) GetNamespace(ctx *context.T) naming.Namespace {
 	ns, _ := ctx.Value(namespaceKey).(naming.Namespace)
 	return ns
 }
 
-func (*RuntimeX) SetNewLogger(ctx *context.T, name string, opts ...vlog.LoggingOpts) (*context.T, vlog.Logger, error) {
+func (*Runtime) SetNewLogger(ctx *context.T, name string, opts ...vlog.LoggingOpts) (*context.T, vlog.Logger, error) {
 	logger, err := vlog.NewLogger(name, opts...)
 	if err == nil {
 		ctx = context.WithValue(ctx, loggerKey, logger)
@@ -402,22 +402,22 @@
 	return ctx, logger, err
 }
 
-func (*RuntimeX) GetLogger(ctx *context.T) vlog.Logger {
+func (*Runtime) GetLogger(ctx *context.T) vlog.Logger {
 	logger, _ := ctx.Value(loggerKey).(vlog.Logger)
 	return logger
 }
 
-func (*RuntimeX) GetAppCycle(ctx *context.T) veyron2.AppCycle {
+func (*Runtime) GetAppCycle(ctx *context.T) veyron2.AppCycle {
 	appCycle, _ := ctx.Value(appCycleKey).(veyron2.AppCycle)
 	return appCycle
 }
 
-func (*RuntimeX) GetListenSpec(ctx *context.T) ipc.ListenSpec {
+func (*Runtime) GetListenSpec(ctx *context.T) ipc.ListenSpec {
 	listenSpec, _ := ctx.Value(listenSpecKey).(*ipc.ListenSpec)
 	return *listenSpec
 }
 
-func (*RuntimeX) SetBackgroundContext(ctx *context.T) *context.T {
+func (*Runtime) SetBackgroundContext(ctx *context.T) *context.T {
 	// Note we add an extra context with a nil value here.
 	// This prevents users from travelling back through the
 	// chain of background contexts.
@@ -425,7 +425,7 @@
 	return context.WithValue(ctx, backgroundKey, ctx)
 }
 
-func (*RuntimeX) GetBackgroundContext(ctx *context.T) *context.T {
+func (*Runtime) GetBackgroundContext(ctx *context.T) *context.T {
 	bctx, _ := ctx.Value(backgroundKey).(*context.T)
 	if bctx == nil {
 		// There should always be a background context.  If we don't find
diff --git a/runtimes/google/rt/runtimex_test.go b/runtimes/google/rt/runtime_test.go
similarity index 97%
rename from runtimes/google/rt/runtimex_test.go
rename to runtimes/google/rt/runtime_test.go
index b505d9a..4f41e20 100644
--- a/runtimes/google/rt/runtimex_test.go
+++ b/runtimes/google/rt/runtime_test.go
@@ -13,7 +13,7 @@
 )
 
 // InitForTest creates a context for use in a test.
-func InitForTest(t *testing.T) (*rt.RuntimeX, *context.T, veyron2.Shutdown) {
+func InitForTest(t *testing.T) (*rt.Runtime, *context.T, veyron2.Shutdown) {
 	ctx, cancel := context.WithCancel(nil)
 	r, ctx, shutdown, err := rt.Init(ctx, nil, nil, nil, flags.RuntimeFlags{}, nil)
 	if err != nil {
diff --git a/runtimes/google/rt/securityx.go b/runtimes/google/rt/security.go
similarity index 100%
rename from runtimes/google/rt/securityx.go
rename to runtimes/google/rt/security.go