metrics

package
v0.0.0-...-d73a40e Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ID                 = uuid.New().String()
	InboundConnCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "inbound_connection_count",
			Help: "The total number of inbound connections established",
		},
		[]string{"id"},
	)
	OutboundConnCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "outbound_connection_count",
			Help: "The total number of outbound connections established",
		},
		[]string{"id"},
	)
	InboundBytesCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "inbound_bytes_count",
			Help: "The total number of bytes sent and received on inbound connections",
		},
		[]string{"id"},
	)
	OutboundBytesCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "outbound_bytes_count",
			Help: "The total number of bytes sent and received on outbound connections",
		},
		[]string{"id"},
	)
	ActiveInboundConnCount int64 = 0
	ActiveInboundConnGauge       = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "active_inbound_connections",
			Help: "The number of currently active inbound connections",
		},
		[]string{"id"},
	)
	ActiveOutboundConnCount int64 = 0
	ActiveOutboundConnGauge       = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "active_outbound_connections",
			Help: "The number of currently active outbound connections",
		},
		[]string{"id"},
	)
)

Functions

func DecrementActiveInboundGauge

func DecrementActiveInboundGauge()

func DecrementActiveOutboundGauge

func DecrementActiveOutboundGauge()

func IncrementActiveInboundGauge

func IncrementActiveInboundGauge()

func IncrementActiveOutboundGauge

func IncrementActiveOutboundGauge()

func UpdateBytesReceivedCounter

func UpdateBytesReceivedCounter(inboundBytesCopied uint64)

func UpdateBytesSentCounter

func UpdateBytesSentCounter(outboundBytesCopied uint64)

Types

type Helper

type Helper struct {
	MetricsAddr string
	// contains filtered or unexported fields
}

func (*Helper) StartMetricsServer

func (p *Helper) StartMetricsServer(metricsAddr string)

Jump to

Keyboard shortcuts

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