Update go-libp2p-resource-manager to v0.5.3
This commit is contained in:
parent
5a133ff2d4
commit
1f65d51a69
2
go.mod
2
go.mod
@ -116,7 +116,7 @@ require (
|
|||||||
github.com/libp2p/go-libp2p-peerstore v0.7.1
|
github.com/libp2p/go-libp2p-peerstore v0.7.1
|
||||||
github.com/libp2p/go-libp2p-pubsub v0.7.1
|
github.com/libp2p/go-libp2p-pubsub v0.7.1
|
||||||
github.com/libp2p/go-libp2p-record v0.1.3
|
github.com/libp2p/go-libp2p-record v0.1.3
|
||||||
github.com/libp2p/go-libp2p-resource-manager v0.5.1
|
github.com/libp2p/go-libp2p-resource-manager v0.5.3
|
||||||
github.com/libp2p/go-libp2p-routing-helpers v0.2.3
|
github.com/libp2p/go-libp2p-routing-helpers v0.2.3
|
||||||
github.com/libp2p/go-maddr-filter v0.1.0
|
github.com/libp2p/go-maddr-filter v0.1.0
|
||||||
github.com/mattn/go-isatty v0.0.14
|
github.com/mattn/go-isatty v0.0.14
|
||||||
|
3
go.sum
3
go.sum
@ -1319,8 +1319,9 @@ github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ
|
|||||||
github.com/libp2p/go-libp2p-resource-manager v0.1.5/go.mod h1:wJPNjeE4XQlxeidwqVY5G6DLOKqFK33u2n8blpl0I6Y=
|
github.com/libp2p/go-libp2p-resource-manager v0.1.5/go.mod h1:wJPNjeE4XQlxeidwqVY5G6DLOKqFK33u2n8blpl0I6Y=
|
||||||
github.com/libp2p/go-libp2p-resource-manager v0.2.1/go.mod h1:K+eCkiapf+ey/LADO4TaMpMTP9/Qde/uLlrnRqV4PLQ=
|
github.com/libp2p/go-libp2p-resource-manager v0.2.1/go.mod h1:K+eCkiapf+ey/LADO4TaMpMTP9/Qde/uLlrnRqV4PLQ=
|
||||||
github.com/libp2p/go-libp2p-resource-manager v0.3.0/go.mod h1:K+eCkiapf+ey/LADO4TaMpMTP9/Qde/uLlrnRqV4PLQ=
|
github.com/libp2p/go-libp2p-resource-manager v0.3.0/go.mod h1:K+eCkiapf+ey/LADO4TaMpMTP9/Qde/uLlrnRqV4PLQ=
|
||||||
github.com/libp2p/go-libp2p-resource-manager v0.5.1 h1:jm0mdqn7yfh7wbUzlj948BYZX0KZ3RW7OqerkGQ5rYY=
|
|
||||||
github.com/libp2p/go-libp2p-resource-manager v0.5.1/go.mod h1:CggtV6EZb+Y0dGh41q5ezO4udcVKyhcEFpydHD8EMe0=
|
github.com/libp2p/go-libp2p-resource-manager v0.5.1/go.mod h1:CggtV6EZb+Y0dGh41q5ezO4udcVKyhcEFpydHD8EMe0=
|
||||||
|
github.com/libp2p/go-libp2p-resource-manager v0.5.3 h1:W8rG2abNBO52SRQYj24AvKmutTJZfoc1OrgzGQPwcRU=
|
||||||
|
github.com/libp2p/go-libp2p-resource-manager v0.5.3/go.mod h1:CggtV6EZb+Y0dGh41q5ezO4udcVKyhcEFpydHD8EMe0=
|
||||||
github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys=
|
github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys=
|
||||||
github.com/libp2p/go-libp2p-routing v0.1.0/go.mod h1:zfLhI1RI8RLEzmEaaPwzonRvXeeSHddONWkcTcB54nE=
|
github.com/libp2p/go-libp2p-routing v0.1.0/go.mod h1:zfLhI1RI8RLEzmEaaPwzonRvXeeSHddONWkcTcB54nE=
|
||||||
github.com/libp2p/go-libp2p-routing-helpers v0.2.3 h1:xY61alxJ6PurSi+MXbywZpelvuU4U4p/gPTxjqCqTzY=
|
github.com/libp2p/go-libp2p-routing-helpers v0.2.3 h1:xY61alxJ6PurSi+MXbywZpelvuU4U4p/gPTxjqCqTzY=
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"go.opencensus.io/tag"
|
"go.opencensus.io/tag"
|
||||||
|
|
||||||
rpcmetrics "github.com/filecoin-project/go-jsonrpc/metrics"
|
rpcmetrics "github.com/filecoin-project/go-jsonrpc/metrics"
|
||||||
"github.com/libp2p/go-libp2p-resource-manager/obs"
|
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/blockstore"
|
"github.com/filecoin-project/lotus/blockstore"
|
||||||
)
|
)
|
||||||
@ -646,7 +645,6 @@ var DefaultViews = func() []*view.View {
|
|||||||
}
|
}
|
||||||
views = append(views, blockstore.DefaultViews...)
|
views = append(views, blockstore.DefaultViews...)
|
||||||
views = append(views, rpcmetrics.DefaultViews...)
|
views = append(views, rpcmetrics.DefaultViews...)
|
||||||
views = append(views, obs.DefaultViews...)
|
|
||||||
return views
|
return views
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -14,8 +14,10 @@ import (
|
|||||||
"github.com/libp2p/go-libp2p-core/peer"
|
"github.com/libp2p/go-libp2p-core/peer"
|
||||||
"github.com/libp2p/go-libp2p-core/protocol"
|
"github.com/libp2p/go-libp2p-core/protocol"
|
||||||
rcmgr "github.com/libp2p/go-libp2p-resource-manager"
|
rcmgr "github.com/libp2p/go-libp2p-resource-manager"
|
||||||
|
"github.com/libp2p/go-libp2p-resource-manager/obs"
|
||||||
rcmgrObs "github.com/libp2p/go-libp2p-resource-manager/obs"
|
rcmgrObs "github.com/libp2p/go-libp2p-resource-manager/obs"
|
||||||
"go.opencensus.io/stats"
|
"go.opencensus.io/stats"
|
||||||
|
"go.opencensus.io/stats/view"
|
||||||
"go.opencensus.io/tag"
|
"go.opencensus.io/tag"
|
||||||
"go.uber.org/fx"
|
"go.uber.org/fx"
|
||||||
|
|
||||||
@ -109,6 +111,7 @@ func ResourceManager(connMgrHi uint) func(lc fx.Lifecycle, repo repo.LockedRepo)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error creating resource manager stats reporter: %w", err)
|
return nil, fmt.Errorf("error creating resource manager stats reporter: %w", err)
|
||||||
}
|
}
|
||||||
|
view.Register(obs.DefaultViews...)
|
||||||
|
|
||||||
// Metrics
|
// Metrics
|
||||||
opts = append(opts, rcmgr.WithMetrics(rcmgrMetrics{}), rcmgr.WithTraceReporter(str))
|
opts = append(opts, rcmgr.WithMetrics(rcmgrMetrics{}), rcmgr.WithTraceReporter(str))
|
||||||
|
Loading…
Reference in New Issue
Block a user