veyron/services/mgmt: Get rid of the term 'invoker' (one more pass)

We decided to use the term 'service' instead of 'impl' for the various
implementations of services. This change updates the remaining files
under services/mgmt to be consistent.

There is no change in functionality.

Change-Id: I2d2e883765d928a23644852548510f299925127f
diff --git a/services/mgmt/debug/dispatcher.go b/services/mgmt/debug/dispatcher.go
index c4ece25..2e44d41 100644
--- a/services/mgmt/debug/dispatcher.go
+++ b/services/mgmt/debug/dispatcher.go
@@ -54,11 +54,11 @@
 	}
 	switch parts[0] {
 	case "logs":
-		return logreaderimpl.NewLogFileServer(d.logsDir, suffix), d.auth, nil
+		return logreaderimpl.NewLogFileService(d.logsDir, suffix), d.auth, nil
 	case "pprof":
-		return pprofimpl.NewServer(), d.auth, nil
+		return pprofimpl.NewPProfService(), d.auth, nil
 	case "stats":
-		return statsimpl.NewStatsServer(suffix, 10*time.Second), d.auth, nil
+		return statsimpl.NewStatsService(suffix, 10*time.Second), d.auth, nil
 	case "vtrace":
 		return vtraceimpl.NewVtraceService(d.store), d.auth, nil
 	}
diff --git a/services/mgmt/logreader/impl/logfile.go b/services/mgmt/logreader/impl/logfile.go
index 52936af..b29f416 100644
--- a/services/mgmt/logreader/impl/logfile.go
+++ b/services/mgmt/logreader/impl/logfile.go
@@ -24,9 +24,9 @@
 	errOperationFailed = verror.Internalf("operation failed")
 )
 
-// NewLogFileServer returns a new log file server.
-func NewLogFileServer(root, suffix string) interface{} {
-	return &logfileImpl{filepath.Clean(root), suffix}
+// NewLogFileService returns a new log file server.
+func NewLogFileService(root, suffix string) interface{} {
+	return &logfileService{filepath.Clean(root), suffix}
 }
 
 // translateNameToFilename returns the file name that corresponds to the object
@@ -43,8 +43,8 @@
 	return p, nil
 }
 
-// logfileImpl holds the state of a logfile invocation.
-type logfileImpl struct {
+// logfileService holds the state of a logfile invocation.
+type logfileService struct {
 	// root is the root directory from which the object names are based.
 	root string
 	// suffix is the suffix of the current invocation that is assumed to
@@ -53,7 +53,7 @@
 }
 
 // Size returns the size of the log file, in bytes.
-func (i *logfileImpl) Size(call ipc.ServerCall) (int64, error) {
+func (i *logfileService) Size(call ipc.ServerCall) (int64, error) {
 	vlog.VI(1).Infof("%v.Size()", i.suffix)
 	fname, err := translateNameToFilename(i.root, i.suffix)
 	if err != nil {
@@ -74,7 +74,7 @@
 }
 
 // ReadLog returns log entries from the log file.
-func (i *logfileImpl) ReadLog(call ipc.ServerCall, startpos int64, numEntries int32, follow bool) (int64, error) {
+func (i *logfileService) ReadLog(call ipc.ServerCall, startpos int64, numEntries int32, follow bool) (int64, error) {
 	vlog.VI(1).Infof("%v.ReadLog(%v, %v, %v)", i.suffix, startpos, numEntries, follow)
 	fname, err := translateNameToFilename(i.root, i.suffix)
 	if err != nil {
@@ -111,7 +111,7 @@
 
 // VGlobChildren returns the list of files in a directory, or an empty list if
 // the object is a file.
-func (i *logfileImpl) VGlobChildren() ([]string, error) {
+func (i *logfileService) VGlobChildren() ([]string, error) {
 	vlog.VI(1).Infof("%v.VGlobChildren()", i.suffix)
 	dirName, err := translateNameToFilename(i.root, i.suffix)
 	if err != nil {
diff --git a/services/mgmt/logreader/impl/logfile_test.go b/services/mgmt/logreader/impl/logfile_test.go
index 5d48e15..7a89c7c 100644
--- a/services/mgmt/logreader/impl/logfile_test.go
+++ b/services/mgmt/logreader/impl/logfile_test.go
@@ -47,7 +47,7 @@
 }
 
 func (d *logFileDispatcher) Lookup(suffix, _ string) (interface{}, security.Authorizer, error) {
-	return impl.NewLogFileServer(d.root, suffix), nil, nil
+	return impl.NewLogFileService(d.root, suffix), nil, nil
 }
 
 func writeAndSync(t *testing.T, w *os.File, s string) {
diff --git a/services/mgmt/node/impl/dispatcher.go b/services/mgmt/node/impl/dispatcher.go
index be18829..ae2cc71 100644
--- a/services/mgmt/node/impl/dispatcher.go
+++ b/services/mgmt/node/impl/dispatcher.go
@@ -366,7 +366,7 @@
 		})
 		return receiver, d.auth, nil
 	case appsSuffix:
-		// Requests to apps/*/*/*/logs are handled locally by LogFileServer.
+		// Requests to apps/*/*/*/logs are handled locally by LogFileService.
 		// Requests to apps/*/*/*/pprof are proxied to the apps' __debug/pprof object.
 		// Requests to apps/*/*/*/stats are proxied to the apps' __debug/stats object.
 		// Everything else is handled by the Application server.
@@ -379,7 +379,7 @@
 			case "logs":
 				logsDir := filepath.Join(appInstanceDir, "logs")
 				suffix := naming.Join(components[5:]...)
-				return logsimpl.NewLogFileServer(logsDir, suffix), d.auth, nil
+				return logsimpl.NewLogFileService(logsDir, suffix), d.auth, nil
 			case "pprof", "stats":
 				info, err := loadInstanceInfo(appInstanceDir)
 				if err != nil {
diff --git a/services/mgmt/pprof/client/proxy_test.go b/services/mgmt/pprof/client/proxy_test.go
index 3fa6ace..176d7d5 100644
--- a/services/mgmt/pprof/client/proxy_test.go
+++ b/services/mgmt/pprof/client/proxy_test.go
@@ -36,7 +36,7 @@
 	if err != nil {
 		t.Fatalf("failed to listen: %v", err)
 	}
-	if err := s.ServeDispatcher("", &dispatcher{impl.NewServer()}); err != nil {
+	if err := s.ServeDispatcher("", &dispatcher{impl.NewPProfService()}); err != nil {
 		t.Fatalf("failed to serve: %v", err)
 	}
 	l, err := client.StartProxy(r, naming.JoinAddressName(endpoint.String(), ""))
diff --git a/services/mgmt/pprof/impl/server.go b/services/mgmt/pprof/impl/server.go
index 842aaf2..8f2f39a 100644
--- a/services/mgmt/pprof/impl/server.go
+++ b/services/mgmt/pprof/impl/server.go
@@ -11,21 +11,21 @@
 	"veyron.io/veyron/veyron2/verror"
 )
 
-// NewServer returns a new pprof server implementation.
-func NewServer() interface{} {
-	return &pprofImpl{}
+// NewPProfService returns a new pprof service implementation.
+func NewPProfService() interface{} {
+	return &pprofService{}
 }
 
-type pprofImpl struct {
+type pprofService struct {
 }
 
 // CmdLine returns the command-line argument of the server.
-func (pprofImpl) CmdLine(ipc.ServerContext) ([]string, error) {
+func (pprofService) CmdLine(ipc.ServerContext) ([]string, error) {
 	return os.Args, nil
 }
 
 // Profiles returns the list of available profiles.
-func (pprofImpl) Profiles(ipc.ServerContext) ([]string, error) {
+func (pprofService) Profiles(ipc.ServerContext) ([]string, error) {
 	profiles := pprof.Profiles()
 	results := make([]string, len(profiles))
 	for i, v := range profiles {
@@ -41,7 +41,7 @@
 // can read the profile without tools.
 //
 // TODO(toddw): Change ipc.ServerCall into a struct stub context.
-func (pprofImpl) Profile(call ipc.ServerCall, name string, debug int32) error {
+func (pprofService) Profile(call ipc.ServerCall, name string, debug int32) error {
 	profile := pprof.Lookup(name)
 	if profile == nil {
 		return verror.NoExistf("profile does not exist")
@@ -56,7 +56,7 @@
 // streams the profile data.
 //
 // TODO(toddw): Change ipc.ServerCall into a struct stub context.
-func (pprofImpl) CPUProfile(call ipc.ServerCall, seconds int32) error {
+func (pprofService) CPUProfile(call ipc.ServerCall, seconds int32) error {
 	if seconds <= 0 || seconds > 3600 {
 		return verror.BadArgf("invalid number of seconds: %d", seconds)
 	}
@@ -70,7 +70,7 @@
 
 // Symbol looks up the program counters and returns their respective
 // function names.
-func (pprofImpl) Symbol(_ ipc.ServerContext, programCounters []uint64) ([]string, error) {
+func (pprofService) Symbol(_ ipc.ServerContext, programCounters []uint64) ([]string, error) {
 	results := make([]string, len(programCounters))
 	for i, v := range programCounters {
 		f := runtime.FuncForPC(uintptr(v))
diff --git a/services/mgmt/stats/impl/stats.go b/services/mgmt/stats/impl/stats.go
index 7f7657f..1b4b7dc 100644
--- a/services/mgmt/stats/impl/stats.go
+++ b/services/mgmt/stats/impl/stats.go
@@ -16,7 +16,7 @@
 	"veyron.io/veyron/veyron2/vlog"
 )
 
-type statsImpl struct {
+type statsService struct {
 	suffix    string
 	watchFreq time.Duration
 }
@@ -27,14 +27,14 @@
 	errOperationFailed = verror.Internalf("operation failed")
 )
 
-// NewStatsServer returns a stats server implementation. The value of watchFreq
+// NewStatsService returns a stats server implementation. The value of watchFreq
 // is used to specify the time between WatchGlob updates.
-func NewStatsServer(suffix string, watchFreq time.Duration) interface{} {
-	return &statsImpl{suffix, watchFreq}
+func NewStatsService(suffix string, watchFreq time.Duration) interface{} {
+	return &statsService{suffix, watchFreq}
 }
 
 // Glob returns the name of all objects that match pattern.
-func (i *statsImpl) Glob(ctx *ipc.GlobContextStub, pattern string) error {
+func (i *statsService) Glob(ctx *ipc.GlobContextStub, pattern string) error {
 	vlog.VI(1).Infof("%v.Glob(%q)", i.suffix, pattern)
 
 	it := stats.Glob(i.suffix, pattern, time.Time{}, false)
@@ -52,7 +52,7 @@
 
 // WatchGlob returns the name and value of the objects that match the request,
 // followed by periodic updates when values change.
-func (i *statsImpl) WatchGlob(call ipc.ServerCall, req watchtypes.GlobRequest) error {
+func (i *statsService) WatchGlob(call ipc.ServerCall, req watchtypes.GlobRequest) error {
 	vlog.VI(1).Infof("%v.WatchGlob(%+v)", i.suffix, req)
 
 	var t time.Time
@@ -92,7 +92,7 @@
 }
 
 // Value returns the value of the receiver object.
-func (i *statsImpl) Value(ctx ipc.ServerContext) (vdlutil.Any, error) {
+func (i *statsService) Value(ctx ipc.ServerContext) (vdlutil.Any, error) {
 	vlog.VI(1).Infof("%v.Value()", i.suffix)
 
 	v, err := stats.Value(i.suffix)
diff --git a/services/mgmt/stats/impl/stats_test.go b/services/mgmt/stats/impl/stats_test.go
index 11cb6c3..dc2bc40 100644
--- a/services/mgmt/stats/impl/stats_test.go
+++ b/services/mgmt/stats/impl/stats_test.go
@@ -23,7 +23,7 @@
 }
 
 func (d *statsDispatcher) Lookup(suffix, method string) (interface{}, security.Authorizer, error) {
-	return impl.NewStatsServer(suffix, 100*time.Millisecond), nil, nil
+	return impl.NewStatsService(suffix, 100*time.Millisecond), nil, nil
 }
 
 func startServer(t *testing.T) (string, func()) {
diff --git a/services/mgmt/vtrace/impl/vtrace.go b/services/mgmt/vtrace/impl/vtrace.go
index 7f23763..3f29f26 100644
--- a/services/mgmt/vtrace/impl/vtrace.go
+++ b/services/mgmt/vtrace/impl/vtrace.go
@@ -7,11 +7,11 @@
 	"veyron.io/veyron/veyron2/vtrace"
 )
 
-type vtraceServer struct {
+type vtraceService struct {
 	store vtrace.Store
 }
 
-func (v *vtraceServer) Trace(ctx ipc.ServerContext, id uniqueid.ID) (vtrace.TraceRecord, error) {
+func (v *vtraceService) Trace(ctx ipc.ServerContext, id uniqueid.ID) (vtrace.TraceRecord, error) {
 	tr := v.store.TraceRecord(id)
 	if tr == nil {
 		return vtrace.TraceRecord{}, verror2.Make(verror2.NoExist, ctx, "No trace with id %x", id)
@@ -20,7 +20,7 @@
 }
 
 // TODO(toddw): Change ipc.ServerCall into a struct stub context.
-func (v *vtraceServer) AllTraces(call ipc.ServerCall) error {
+func (v *vtraceService) AllTraces(call ipc.ServerCall) error {
 	// TODO(mattr): Consider changing the store to allow us to iterate through traces
 	// when there are many.
 	traces := v.store.TraceRecords()
@@ -33,5 +33,5 @@
 }
 
 func NewVtraceService(store vtrace.Store) interface{} {
-	return &vtraceServer{store}
+	return &vtraceService{store}
 }