Skip to content

Commit 0edd2a2

Browse files
authoredJun 30, 2022
Add endpoint parameter to the OpenConnection method for ResourceManager (#257)
1 parent c2e77cf commit 0edd2a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎core/network/rcmgr.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package network
33
import (
44
"github.com/libp2p/go-libp2p-core/peer"
55
"github.com/libp2p/go-libp2p-core/protocol"
6+
"github.com/multiformats/go-multiaddr"
67
)
78

89
// ResourceManager is the interface to the network resource management subsystem.
@@ -83,7 +84,7 @@ type ResourceManager interface {
8384
// is scoped at the transient scope.
8485
// The caller owns the returned scope and is responsible for calling Done in order to signify
8586
// the end of the scope's span.
86-
OpenConnection(dir Direction, usefd bool) (ConnManagementScope, error)
87+
OpenConnection(dir Direction, usefd bool, endpoint multiaddr.Multiaddr) (ConnManagementScope, error)
8788

8889
// OpenStream creates a new stream scope, initially unnegotiated.
8990
// An unnegotiated stream will be initially unattached to any protocol scope
@@ -300,7 +301,7 @@ func (n *nullResourceManager) ViewProtocol(p protocol.ID, f func(ProtocolScope)
300301
func (n *nullResourceManager) ViewPeer(p peer.ID, f func(PeerScope) error) error {
301302
return f(NullScope)
302303
}
303-
func (n *nullResourceManager) OpenConnection(dir Direction, usefd bool) (ConnManagementScope, error) {
304+
func (n *nullResourceManager) OpenConnection(dir Direction, usefd bool, endpoint multiaddr.Multiaddr) (ConnManagementScope, error) {
304305
return NullScope, nil
305306
}
306307
func (n *nullResourceManager) OpenStream(p peer.ID, dir Direction) (StreamManagementScope, error) {

0 commit comments

Comments
 (0)
Please sign in to comment.