17 lines
298 B
Go
17 lines
298 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"gogrpc/proto"
|
|
)
|
|
|
|
type Service struct {
|
|
proto.UnimplementedServiceServer
|
|
}
|
|
|
|
func (s *Service) Ping(context.Context, *proto.PingMessage) (*proto.PingMessage, error) {
|
|
return &proto.PingMessage{Message: "pong"}, nil
|
|
}
|
|
|
|
var _ proto.ServiceServer = (*Service)(nil)
|