metrics

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 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() []*server.Account
}

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) *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