func (s *Server) Sum(_ context.Context, in *tspb.SumRequest) (*tspb.SumResponse, error) {
	sum := int32(0)
	for _, v := range in.GetValues() {
		sum += v
	}
	return &tspb.SumResponse{
		Value: sum,
	}, nil
}
Sum handles TestService.Sum RPCs.
package testing
import (
	"context"
	"io"
	tspb "github.com/google/martian/v3/h2/testservice"
)
type Server struct {
	tspb.UnimplementedTestServiceServer
}
func (s *Server) Echo(ctx context.Context, in *tspb.EchoRequest) (*tspb.EchoResponse, error) {
	return &tspb.EchoResponse{
		Payload: in.GetPayload(),
	}, nil
}