func New(replica api.ConnectionHandler) ReplicaServer {
	return &server{replica: replica}
}
New creates a new instance of ReplicaServer using the specified
replica instance to connect incoming requests with.
package server
import (
	"fmt"
	"io"
	"log"
	"net"
	"golang.org/x/sync/errgroup"
	"google.golang.org/grpc"
	"github.com/hyperledger-labs/minbft/api"
	"github.com/hyperledger-labs/minbft/sample/conn/grpc/proto"
)
type ReplicaServer interface {
	Serve(lis net.Listener, serverOpts ...grpc.ServerOption) error
	Stop()
}
func ListenAndServe(s ReplicaServer, addr string, serverOpts ...grpc.ServerOption) error {
	lis, err := net.Listen("tcp", addr)
	if err != nil {
		return fmt.Errorf("error listening on %s: %s", addr, err)
	}
	return s.Serve(lis)
}
type server struct {
	proto.UnimplementedChannelServer
	replica    api.ConnectionHandler
	grpcServer *grpc.Server
}