reporting

package
v0.0.0-...-156e221 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Zone            string
	SiteName        string
	NrBuckets       int
	ReportFrequency time.Duration
	InfluxHost      string
	InfluxToken     string
	InfluxDatabase  string
}

Configuration variables for the Reporter component.

type Reporter

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

Reporter is the component which is in charge of gathering and aggregating all collected statistics and sending the report to InfluxDB. One Reporter is in charge of reporting stats for one configured DNS zone.

func New

func New(config Config,
	resolverInfoMap *stats.ResolverInfoMap,
	zoneStats *stats.ZoneStats,
	nrReportsMade prometheus.Counter,
	nrReportsSent prometheus.Counter) *Reporter

Creates a new Reporter component which reads statistics from zoneStats, enriched with resolverInfoMap

func (*Reporter) ComponentName

func (r *Reporter) ComponentName() string

func (*Reporter) IsHealthy

func (r *Reporter) IsHealthy(ctx context.Context) error

Reports whether the Reporter component is health (InfluxDB is reachable)

func (*Reporter) Start

func (r *Reporter) Start(ctx context.Context, group *errgroup.Group)

Start this reporter's reporting loop.

Jump to

Keyboard shortcuts

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