Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is an object for storing metrics in a circular buffer.
func NewBuffer ¶
NewBuffer returns a Buffer
size is the maximum number of metrics that Buffer will cache. If Add is called when the buffer is full, then the oldest metric(s) will be dropped.
func (*Buffer) Batch ¶
Batch returns a batch of metrics of size batchSize. the batch will be of maximum length batchSize. It can be less than batchSize, if the length of Buffer is less than batchSize.
func (*Buffer) Drops ¶ added in v0.7.0
Drops returns the total number of dropped metrics that have occured in this buffer since instantiation.
Click to show internal directories.
Click to hide internal directories.