Skip to content

Commit

Permalink
Merge pull request #73 from libp2p/remove-deprecated-types
Browse files Browse the repository at this point in the history
remove deprecated types
  • Loading branch information
Stebalien authored Jul 22, 2021
2 parents 47d54ff + 8a221ef commit b29843f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions p2p/discovery/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"time"

"github.com/libp2p/go-libp2p-core/discovery"
"github.com/libp2p/go-libp2p-core/peer"

logging "github.com/ipfs/go-log"
Expand All @@ -12,7 +13,7 @@ import (
var log = logging.Logger("discovery")

// FindPeers is a utility function that synchronously collects peers from a Discoverer.
func FindPeers(ctx context.Context, d Discoverer, ns string, opts ...Option) ([]peer.AddrInfo, error) {
func FindPeers(ctx context.Context, d discovery.Discoverer, ns string, opts ...discovery.Option) ([]peer.AddrInfo, error) {
var res []peer.AddrInfo

ch, err := d.FindPeers(ctx, ns, opts...)
Expand All @@ -28,7 +29,7 @@ func FindPeers(ctx context.Context, d Discoverer, ns string, opts ...Option) ([]
}

// Advertise is a utility function that persistently advertises a service through an Advertiser.
func Advertise(ctx context.Context, a Advertiser, ns string, opts ...Option) {
func Advertise(ctx context.Context, a discovery.Advertiser, ns string, opts ...discovery.Option) {
go func() {
for {
ttl, err := a.Advertise(ctx, ns, opts...)
Expand Down

0 comments on commit b29843f

Please sign in to comment.