README ¶
Example Service: test
This example service is used for testing purposes.
Prerequisites
- Install gRPC
- Make sure protoc is in GOPATH/bin
- Make sure google/protobuf is also in GOPATH/bin
- Install grpc-gateway
Regenerate client/server from proto
- Use go:generate to build client/server and swagger docs:
go generate
Documentation ¶
Index ¶
- type Service
- func (s *Service) Echo(ctx context.Context, in *pb.SendRequest) (*pb.EchoResponse, error)
- func (s *Service) Large(ctx context.Context, in *pb.LargeRequest) (*pb.EchoResponse, error)
- func (s *Service) Send(ctx context.Context, in *pb.SendRequest) (*pb.TestResponse, error)
- func (s *Service) Stream(stream pb.TestService_StreamServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct{}
Service contains the implementation for the gRPC service.
func (*Service) Echo ¶
func (s *Service) Echo(ctx context.Context, in *pb.SendRequest) (*pb.EchoResponse, error)
Echo the value in the request back in the response.
func (*Service) Large ¶
func (s *Service) Large(ctx context.Context, in *pb.LargeRequest) (*pb.EchoResponse, error)
Large will send a large response message.
func (*Service) Send ¶
func (s *Service) Send(ctx context.Context, in *pb.SendRequest) (*pb.TestResponse, error)
Send the value in the request.
Click to show internal directories.
Click to hide internal directories.