metricsender

package
v0.0.0-...-be26699 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2015 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package metricsender contains functions for sending metrics from a state server to a remote metric collector.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendMetrics

func SendMetrics(st *state.State, sender MetricSender, batchSize int) error

SendMetrics will send any unsent metrics over the MetricSender interface in batches no larger than batchSize.

Types

type DefaultSender

type DefaultSender struct {
}

DefaultSender is the default used for sending metrics to the collector service.

func (*DefaultSender) Send

func (s *DefaultSender) Send(metrics []*wireformat.MetricBatch) (*wireformat.Response, error)

Send sends the given metrics to the collector service.

type MetricSender

type MetricSender interface {
	Send([]*wireformat.MetricBatch) (*wireformat.Response, error)
}

MetricSender defines the interface used to send metrics to a collection service.

type NopSender

type NopSender struct {
}

NopSender is a sender that acts like everything worked fine But doesn't do anything.

func (NopSender) Send

func (n NopSender) Send(batches []*wireformat.MetricBatch) (*wireformat.Response, error)

Implement the send interface, act like everything is fine.

Directories

Path Synopsis
Package wireformat defines the format that will be used to send metric batches to the collector and receive updates.
Package wireformat defines the format that will be used to send metric batches to the collector and receive updates.

Jump to

Keyboard shortcuts

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