metrics

package
v0.75.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 16 Imported by: 3

Documentation

Overview

Package metrics gather anonymous information about the usage of NetBird management

Index

Constants

View Source
const (
	// PayloadEvent identifies an event type
	PayloadEvent = "self-hosted stats"

	EmbeddedType = "embedded"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnManager

type ConnManager interface {
	GetAllConnectedPeers() map[string]struct{}
}

ConnManager peer connection manager that holds state for current active connections

type DataSource

type DataSource interface {
	GetAllAccounts(ctx context.Context) []*types.Account
	GetStoreEngine() types.Engine
	GetCustomDomainsCounts(ctx context.Context) (total int64, validated int64, err error)
	GetProxyMetrics(ctx context.Context) (store.ProxyMetrics, error)
	GetAgentNetworkMetrics(ctx context.Context) (store.AgentNetworkMetrics, error)
}

DataSource metric data source

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

Worker metrics collector and pusher

func NewWorker

func NewWorker(ctx context.Context, id string, dataSource DataSource, connManager ConnManager, idpManager string) *Worker

NewWorker returns a metrics worker

func (*Worker) Run

func (w *Worker) Run(ctx context.Context)

Run runs the metrics worker

Jump to

Keyboard shortcuts

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