Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: client/cmd/rpc/doc.go

Issue 1587323003: client/cmd/rpc: RPC CLI (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@discovery
Patch Set: rebased Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/cmd/rpc/call.go ('k') | client/cmd/rpc/generate.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cmd/rpc/doc.go
diff --git a/client/cmd/rpc/doc.go b/client/cmd/rpc/doc.go
new file mode 100644
index 0000000000000000000000000000000000000000..0250fbf16e07f8482a88d7122026abe7b55ae933
--- /dev/null
+++ b/client/cmd/rpc/doc.go
@@ -0,0 +1,62 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Command rpc can make RPCs to pRPC servers and display their description.
+//
+// Subcommand call
+//
+// call subcommand reads from stdin, sends a request to a specified service
+// at a specified server in a special format (defaults to json) and
+// prints the response back to stdout.
+//
+// $ echo '{"name": "Lucy"}' | rpc call :8080 helloworld.Greeter.SayHello
+// {
+// "message": "Hello Lucy"
+// }
+//
+// Subcommand show
+//
+// show subcommand resolves a name and describes the referenced entity
+// in proto-like syntax. If name is not specified, lists available services.
+//
+// $ rpc show :8080
+// helloworld.Greeter
+// discovery.Discovery
+//
+// Show a service:
+//
+// $ rpc show :8080 helloworld.Greeter
+// // The greeting service definition.
+// service Greeter {
+// // Sends a greeting
+// rpc SayHello(HelloRequest) returns (HelloReply) {};
+// }
+//
+// Show a method:
+//
+// $ rpc show :8080 helloworld.Greeter.SayHello
+// // The greeting service definition.
+// service Greeter {
+// // Sends a greeting
+// rpc SayHello(HelloRequest) returns (HelloReply) {};
+// }
+//
+// // The request message containing the user's name.
+// message HelloRequest {
+// string name = 1;
+// }
+//
+// // The response message containing the greetings
+// message HelloReply {
+// string message = 1;
+// }
+//
+// Show a type:
+//
+// $ rpc show :8080 helloworld.HelloReply
+// // The response message containing the greetings
+// message HelloReply {
+// string message = 1;
+// }
+package main
« no previous file with comments | « client/cmd/rpc/call.go ('k') | client/cmd/rpc/generate.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698