pond: ConnMgr: DisconAll, syncing

This commit is contained in:
Łukasz Magiera
2019-07-25 23:52:16 +02:00
parent dd92489a8f
commit 583f4e02cb
7 changed files with 93 additions and 33 deletions
+3
View File
@@ -3,6 +3,7 @@ package api
import (
"context"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/filecoin-project/go-lotus/chain"
@@ -45,9 +46,11 @@ type Common interface {
// network
NetConnectedness(context.Context, peer.ID) (network.Connectedness, error)
NetPeers(context.Context) ([]peer.AddrInfo, error)
NetConnect(context.Context, peer.AddrInfo) error
NetAddrsListen(context.Context) (peer.AddrInfo, error)
NetDisconnect(context.Context, peer.ID) error
// ID returns peerID of libp2p node backing this API
ID(context.Context) (peer.ID, error)