aggregator

package
Version: v0.0.0-...-719a1d6 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package aggregator contains the data structures responsible for aggregating payloads recevied by the server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

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

Aggregator holds all Projects

func NewAggregator

func NewAggregator() *Aggregator

NewAggregator creates a new aggregator

func (*Aggregator) PrintHealthMetrics

func (a *Aggregator) PrintHealthMetrics()

PrintHealthMetrics renders some simple health metrics

func (*Aggregator) Process

func (a *Aggregator) Process(project string, payload *payload.Payload)

Process aggreates a payload

func (*Aggregator) ProjectNames

func (a *Aggregator) ProjectNames() []string

ProjectNames returns a list of projects that currently exist

func (*Aggregator) SendHourlyMetrics

func (a *Aggregator) SendHourlyMetrics(handler MetricHandler)

SendHourlyMetrics passes all metrics to MetricHandler

func (*Aggregator) SendMetrics

func (a *Aggregator) SendMetrics(handler MetricHandler)

SendMetrics passes all metrics to MetricHandler

type MetricHandler

type MetricHandler func(name string, value float64)

A MetricHandler takes care of sending metrics to somewhere

type Project

type Project struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

A Project aggregates metrics for a entire project.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL