go-libp2p-resource-manager/trace.go

40 lines
1.5 KiB
Go
Raw Normal View History

2022-01-15 19:36:28 +08:00
package rcmgr
import (
2022-08-18 20:21:11 +08:00
rcmgr "github.com/libp2p/go-libp2p/p2p/host/resource-manager"
2022-01-15 19:36:28 +08:00
)
2022-08-18 20:21:11 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/resource-manager.TraceReporter instead
type TraceReporter = rcmgr.TraceReporter
2022-01-15 23:34:40 +08:00
2022-08-18 20:21:11 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/resource-manager.WithTrace instead
2022-01-15 23:34:40 +08:00
func WithTrace(path string) Option {
2022-08-18 20:21:11 +08:00
return rcmgr.WithTrace(path)
}
2022-08-18 20:21:11 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/resource-manager.WithTraceReporter instead
func WithTraceReporter(reporter TraceReporter) Option {
2022-08-18 20:21:11 +08:00
return rcmgr.WithTraceReporter(reporter)
2022-01-15 23:34:40 +08:00
}
2022-08-18 20:21:11 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/resource-manager.TraceEvtTyp instead
type TraceEvtTyp = rcmgr.TraceEvtTyp
2022-01-15 23:34:40 +08:00
const (
2022-08-18 20:21:11 +08:00
TraceStartEvt = rcmgr.TraceStartEvt
TraceCreateScopeEvt = rcmgr.TraceCreateScopeEvt
TraceDestroyScopeEvt = rcmgr.TraceDestroyScopeEvt
TraceReserveMemoryEvt = rcmgr.TraceReserveMemoryEvt
TraceBlockReserveMemoryEvt = rcmgr.TraceBlockReserveMemoryEvt
TraceReleaseMemoryEvt = rcmgr.TraceReleaseMemoryEvt
TraceAddStreamEvt = rcmgr.TraceAddStreamEvt
TraceBlockAddStreamEvt = rcmgr.TraceBlockAddStreamEvt
TraceRemoveStreamEvt = rcmgr.TraceRemoveStreamEvt
TraceAddConnEvt = rcmgr.TraceAddConnEvt
TraceBlockAddConnEvt = rcmgr.TraceBlockAddConnEvt
TraceRemoveConnEvt = rcmgr.TraceRemoveConnEvt
2022-01-15 23:34:40 +08:00
)
2022-08-18 20:21:11 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/resource-manager.TraceEvt instead
type TraceEvt = rcmgr.TraceEvt