Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
Batch allows the collection of multiple data points, and to send it to the Collector after finalization.
func NewMetricsBatch ¶
func NewMetricsBatch(dataCh chan<- []*pb.MetricsPayload_Metric) *Batch
NewMetricsBatch creates and returns a new MetricsBatch.
func (*Batch) Commit ¶
func (s *Batch) Commit()
Commit finalizes the data, adding a timestamp, and then sends it to Collector. Data gets grouped by timestamp, and then sent to the API.
func (*Batch) Gauge ¶
func (s *Batch) Gauge(key string, value float64, labels []*pb.MetricsPayload_Label)
Gauge accepts a metric key and a value, inserting it into the batch data.
func (*Batch) Info ¶
func (s *Batch) Info(key string, value []*pb.MetricsPayload_Label, labels []*pb.MetricsPayload_Label)
Info accepts a metric key and a value, inserting it into the batch data.
Click to show internal directories.
Click to hide internal directories.