Documentation
¶
Index ¶
- type Aggregator
- func (c *Aggregator) AsNumber() core.Number
- func (c *Aggregator) Collect(ctx context.Context, rec export.MetricRecord, exp export.MetricBatcher)
- func (c *Aggregator) Merge(oa export.MetricAggregator, desc *export.Descriptor)
- func (c *Aggregator) Update(_ context.Context, number core.Number, rec export.MetricRecord)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator aggregates counter events.
func New ¶
func New() *Aggregator
New returns a new counter aggregator. This aggregator computes an atomic sum.
func (*Aggregator) AsNumber ¶
func (c *Aggregator) AsNumber() core.Number
AsNumber returns the accumulated count as an int64.
func (*Aggregator) Collect ¶
func (c *Aggregator) Collect(ctx context.Context, rec export.MetricRecord, exp export.MetricBatcher)
Collect checkpoints the current value (atomically) and exports it.
func (*Aggregator) Merge ¶
func (c *Aggregator) Merge(oa export.MetricAggregator, desc *export.Descriptor)
func (*Aggregator) Update ¶
func (c *Aggregator) Update(_ context.Context, number core.Number, rec export.MetricRecord)
Update modifies the current value (atomically) for later export.
Click to show internal directories.
Click to hide internal directories.