metrics

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: BSD-3-Clause Imports: 13 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"
)

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) []*server.Account
	GetStoreEngine() server.StoreEngine
}

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