chore: proofread generated rpc call comments
I found the comments describing the unicast rpc call is the same as the comment for the quorum call, which doesn't make sense. It would be nice to have correct comments for all of the different rpc options.
// Unicast is a quorum call invoked on all nodes in configuration c,
// with the same argument in, and returns a combined result.
func (n *Node) Unicast(ctx context.Context, in *Request, opts ...gorums.CallOption) {
cd := gorums.CallData{
Message: in,
Method: "dev.ZorumsService.Unicast",
}
n.RawNode.Unicast(ctx, cd, opts...)
}
Another example is the NewServer function, there is no generated NewServer function.
// NewServer returns a new instance of GorumsServer.
// This function is intended for internal Gorums use.
// You should call `NewServer` in the generated code instead.
func NewServer(opts ...ServerOption) *Server {
var serverOpts serverOptions
for _, opt := range opts {
opt(&serverOpts)
}
s := &Server{
srv: newOrderingServer(&serverOpts),
grpcServer: grpc.NewServer(serverOpts.grpcOpts...),
}
ordering.RegisterGorumsServer(s.grpcServer, s.srv)
return s
}
The second comment is duplicate of #172.
May also be a duplicate, but the comment for ZorumsService GRPCCall is also confusing, gorums does not ignore the rpc.
service ZorumsService {
// GRPCCall plain gRPC call; testing that Gorums can ignore these, but that
// they are added to the _grpc.pb.go generated file.
rpc GRPCCall(Request) returns (Response) {}
...
}
This can be fixed by adding appropriate comments in the different templates.
For example, the template_rpc.go file uses this:
var rpcCall = commonVariables +
rpcVar +
quorumCallComment +
rpcSignature +
rpcBody
Where an appropriate RPC comment should be used instead of quorumCallComment.
template_multicast.go and template_unicast.go also uses quorumCallComment