func WithNodeReporter(f func()) Opt {
	return func(p *Peers) {
		p.nodeReporter = f
	}
}
WithNodeReporter sets callback to report node status.
Callback is invoked after new peer joins or disconnects.
package bootstrap
import (
	"context"
	"sync/atomic"
	"github.com/libp2p/go-libp2p-core/event"
	"github.com/libp2p/go-libp2p-core/host"
	"github.com/libp2p/go-libp2p-core/network"
	"github.com/libp2p/go-libp2p-core/peer"
	"golang.org/x/sync/errgroup"
	"github.com/spacemeshos/go-spacemesh/log"
)
type waitPeersReq struct {
	ch  chan []peer.ID
	min int
}
type Opt func(*Peers)
func WithLog(logger log.Log) Opt {
	return func(p *Peers) {
		p.logger = logger
	}
}