17 lines
403 B
Go
17 lines
403 B
Go
package metrics
|
|
|
|
import (
|
|
peer "github.com/libp2p/go-libp2p-peer"
|
|
protocol "github.com/libp2p/go-libp2p-protocol"
|
|
)
|
|
|
|
type Reporter interface {
|
|
LogSentMessage(int64)
|
|
LogRecvMessage(int64)
|
|
LogSentMessageStream(int64, protocol.ID, peer.ID)
|
|
LogRecvMessageStream(int64, protocol.ID, peer.ID)
|
|
GetBandwidthForPeer(peer.ID) Stats
|
|
GetBandwidthForProtocol(protocol.ID) Stats
|
|
GetBandwidthTotals() Stats
|
|
}
|