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)
Click to show internal directories.
Click to hide internal directories.