aboutsummaryrefslogtreecommitdiff
path: root/api/handler.go
blob: f123180b5b2f31f0818942dbd7593a340162b346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
}