Versions in this module Expand all Collapse all v0 v0.23.5 Nov 8, 2022 Changes in this version + type BandwidthCounter struct + func NewBandwidthCounter() *BandwidthCounter + func (bwc *BandwidthCounter) GetBandwidthByPeer() map[peer.ID]Stats + func (bwc *BandwidthCounter) GetBandwidthByProtocol() map[protocol.ID]Stats + func (bwc *BandwidthCounter) GetBandwidthForPeer(p peer.ID) (out Stats) + func (bwc *BandwidthCounter) GetBandwidthForProtocol(proto protocol.ID) (out Stats) + func (bwc *BandwidthCounter) GetBandwidthTotals() (out Stats) + func (bwc *BandwidthCounter) LogRecvMessage(size int64) + func (bwc *BandwidthCounter) LogRecvMessageStream(size int64, proto protocol.ID, p peer.ID) + func (bwc *BandwidthCounter) LogSentMessage(size int64) + func (bwc *BandwidthCounter) LogSentMessageStream(size int64, proto protocol.ID, p peer.ID) + func (bwc *BandwidthCounter) Reset() + func (bwc *BandwidthCounter) TrimIdle(since time.Time) + type Reporter interface + GetBandwidthByPeer func() map[peer.ID]Stats + GetBandwidthByProtocol func() map[protocol.ID]Stats + GetBandwidthForPeer func(peer.ID) Stats + GetBandwidthForProtocol func(protocol.ID) Stats + GetBandwidthTotals func() Stats + LogRecvMessage func(int64) + LogRecvMessageStream func(int64, protocol.ID, peer.ID) + LogSentMessage func(int64) + LogSentMessageStream func(int64, protocol.ID, peer.ID) + type Stats struct + RateIn float64 + RateOut float64 + TotalIn int64 + TotalOut int64