event

package
v0.0.0-...-6e3bf65 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	StatsChanBufSize = 4096 // We buffer this many stats/sec
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricEvent

type MetricEvent struct {
	Timestamp  int64
	Value      float64
	Sender     string
	SourceIP   string `omitempty:"true"`
	MetricType string
	Threshold  map[string]float64 `omitempty:"true"`
	Aggregate  string
}

These are the metrics we receive on the wire.

Valid values for Aggregate:

  • Average
  • Total

type MetricReporter

type MetricReporter struct {
	NatsUrl string
	// contains filtered or unexported fields
}

func NewMetricReporter

func NewMetricReporter(natsUrl string) *MetricReporter

func (*MetricReporter) ProcessMetrics

func (r *MetricReporter) ProcessMetrics() error

func (*MetricReporter) Quit

func (r *MetricReporter) Quit()

func (*MetricReporter) TrySendMetrics

func (r *MetricReporter) TrySendMetrics(evt *MetricEvent)

Jump to

Keyboard shortcuts

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