aboutsummaryrefslogtreecommitdiff
path: root/api/handler.go
diff options
context:
space:
mode:
authorCarlos Sosa <gnusosa@gnusosa.net>2020-06-22 11:33:39 -0700
committerCarlos Sosa <gnusosa@gnusosa.net>2020-06-22 11:33:39 -0700
commit0b609156b184d00ab1a6e742b9b998be4457345e (patch)
tree9283646735cf0f7a984ff0fe4013f6abc7a8be4f /api/handler.go
First Commit
Diffstat (limited to 'api/handler.go')
-rw-r--r--api/handler.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/api/handler.go b/api/handler.go
new file mode 100644
index 0000000..f123180
--- /dev/null
+++ b/api/handler.go
@@ -0,0 +1,17 @@
+package api
+
+import (
+ "log"
+
+ "golang.org/x/net/context"
+)
+
+// Server represents the gRPC server
+type Server struct {
+}
+
+// SayHello generates response to a Ping request
+func (s *Server) SayHello(ctx context.Context, in *PingMessage) (*PingMessage, error) {
+ log.Printf("Receive message %s", in.Greeting)
+ return &PingMessage{Greeting: "bar"}, nil
+}