Versions in this module Expand all Collapse all v0 v0.1.0 May 24, 2019 v0.0.1 Mar 1, 2019 Changes in this version + type BandwidthCounter struct + func NewBandwidthCounter() *BandwidthCounter + 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) + type Reporter interface + 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