func NewServer(
	router *mesh.Router,
	peer *meshconn.Peer,
	minPeerCount int,
	terminatec <-chan struct{},
	terminatedc chan<- error,
	logger mesh.Logger,
) Server {
	c := make(chan Server)
	go serverManager(router, peer, minPeerCount, terminatec, terminatedc, logger, c)
	return <-c
}
func NewServer(
	router *mesh.Router,
	peer *meshconn.Peer,
	minPeerCount int,
	terminatec <-chan struct{},
	terminatedc chan<- error,
	logger mesh.Logger,
) Server {
	c := make(chan Server)
	go serverManager(router, peer, minPeerCount, terminatec, terminatedc, logger, c)
	return <-c
}
// NewServer returns a Server that (partially) implements the etcd V3 API.
// It uses the passed mesh components to act as the Raft transport.
// For the moment, it blocks until the mesh has minPeerCount peers.
// (This responsibility should rather be given to the caller.)
// The server can be terminated by certain conditions in the cluster.
// If that happens, terminatedc signaled, and the server is invalid.