mirror of
https://github.com/libp2p/go-libp2p-resource-manager.git
synced 2025-03-11 01:30:40 +08:00
update for interface changes
This commit is contained in:
parent
bf44d21414
commit
92edf5f224
6
rcmgr.go
6
rcmgr.go
@ -79,8 +79,8 @@ type connectionScope struct {
|
|||||||
peer *peerScope
|
peer *peerScope
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ network.ConnectionScope = (*connectionScope)(nil)
|
var _ network.ConnScope = (*connectionScope)(nil)
|
||||||
var _ network.ConnectionManagementScope = (*connectionScope)(nil)
|
var _ network.ConnManagementScope = (*connectionScope)(nil)
|
||||||
|
|
||||||
type streamScope struct {
|
type streamScope struct {
|
||||||
*resourceScope
|
*resourceScope
|
||||||
@ -187,7 +187,7 @@ func (r *resourceManager) getPeerScope(p peer.ID) *peerScope {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *resourceManager) OpenConnection(dir network.Direction, usefd bool) (network.ConnectionManagementScope, error) {
|
func (r *resourceManager) OpenConnection(dir network.Direction, usefd bool) (network.ConnManagementScope, error) {
|
||||||
conn := newConnectionScope(dir, usefd, r.limits.GetConnLimits(), r)
|
conn := newConnectionScope(dir, usefd, r.limits.GetConnLimits(), r)
|
||||||
|
|
||||||
if err := conn.AddConn(dir, usefd); err != nil {
|
if err := conn.AddConn(dir, usefd); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user