func NewRelayDiscovery(host host.Host, adv *discovery.RoutingDiscovery, opts ...circuit.RelayOpt) *Relay {
	r := new(Relay)
	r.advertise = adv
	var err error
	r.crelay, err = newRelay(context.Background(), host, opts...)
	if err != nil {
		return nil
	}
	return r
}
NewRelayDiscovery new relay discovery
package extension
import (
	"context"
	"time"
	circuit "github.com/libp2p/go-libp2p-circuit"
	coredis "github.com/libp2p/go-libp2p-core/discovery"
	host "github.com/libp2p/go-libp2p-core/host"
	"github.com/libp2p/go-libp2p-core/peer"
	discovery "github.com/libp2p/go-libp2p-discovery"
	swarm "github.com/libp2p/go-libp2p-swarm"
	swarmt "github.com/libp2p/go-libp2p-swarm/testing"
	relay "github.com/libp2p/go-libp2p/p2p/host/relay"
)
type Relay struct {
	advertise *discovery.RoutingDiscovery
	crelay    *circuit.Relay
}
func newRelay(ctx context.Context, host host.Host, opts ...circuit.RelayOpt) (*circuit.Relay, error) {
	r, err := circuit.NewRelay(ctx, host, swarmt.GenUpgrader(host.Network().(*swarm.Swarm)), opts...)
	if err != nil {
		return nil, err
	}
	return r, nil
}