metrics

package
v0.29.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	metric.Meter

	TransferBytesSent metric.Int64Counter
	TransferBytesRecv metric.Int64Counter
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(ctx context.Context, meter metric.Meter) (*Metrics, error)

func (*Metrics) PeerActivity

func (m *Metrics) PeerActivity(peerID string)

PeerActivity increases the active connections

func (*Metrics) PeerConnected

func (m *Metrics) PeerConnected(id string)

PeerConnected increments the number of connected peers and increments number of idle connections

func (*Metrics) PeerDisconnected

func (m *Metrics) PeerDisconnected(id string)

PeerDisconnected decrements the number of connected peers and decrements number of idle or active connections

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL