playground: Rename things called *Context to *Call.
This is part of an effort to clarify naming around contexts. We are
going to rename ServerContext and security.Context to ServerCall and
security.Call respectively. Now when people say "context" we will
know they mean context.T.
In a follow-up change I can try to change the variable names ctx and
context to call. I also need to merge the security.Call interface into
ClientCall and remove redundant access to LocalPrincipal.
MultiPart: 9/11
Change-Id: I131f41b843b8a5aed05397bd3738f666c734d69d
diff --git a/client/bundles/fortune/ex0_go/src/server/server.go b/client/bundles/fortune/ex0_go/src/server/server.go
index 29d5b8c..df011e8 100644
--- a/client/bundles/fortune/ex0_go/src/server/server.go
+++ b/client/bundles/fortune/ex0_go/src/server/server.go
@@ -39,13 +39,13 @@
}
// Methods that get called by RPC requests.
-func (f *fortuned) Get(_ ipc.ServerContext) (Fortune string, err error) {
+func (f *fortuned) Get(_ ipc.ServerCall) (Fortune string, err error) {
Fortune = f.fortunes[f.random.Intn(len(f.fortunes))]
fmt.Printf("Serving: %s\n", Fortune)
return Fortune, nil
}
-func (f *fortuned) Add(_ ipc.ServerContext, Fortune string) error {
+func (f *fortuned) Add(_ ipc.ServerCall, Fortune string) error {
fmt.Printf("Adding: %s\n", Fortune)
f.fortunes = append(f.fortunes, Fortune)
return nil
diff --git a/go/src/playground/testdata/src/pong/pong.go b/go/src/playground/testdata/src/pong/pong.go
index 73d8a1f..8aff4cd 100644
--- a/go/src/playground/testdata/src/pong/pong.go
+++ b/go/src/playground/testdata/src/pong/pong.go
@@ -16,8 +16,8 @@
type pongd struct{}
-func (f *pongd) Ping(ctx ipc.ServerContext, message string) (result string, err error) {
- remote, _ := ctx.RemoteBlessings().ForContext(ctx)
+func (f *pongd) Ping(ctx ipc.ServerCall, message string) (result string, err error) {
+ remote, _ := ctx.RemoteBlessings().ForCall(ctx)
fmt.Printf("%v: %q\n", remote, message)
return "PONG", nil
}