metrics

package
v0.0.0-...-93fed14 Latest Latest
Warning

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

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

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() []*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()

Run runs the metrics worker

Jump to

Keyboard shortcuts

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