package test
import "go.opentelemetry.io/otel/exporters/metric/test"
Index ¶
- type CheckpointSet
- func NewCheckpointSet(encoder export.LabelEncoder) *CheckpointSet
- func (p *CheckpointSet) Add(desc *export.Descriptor, newAgg export.Aggregator, labels ...core.KeyValue) (agg export.Aggregator, added bool)
- func (p *CheckpointSet) AddCounter(desc *export.Descriptor, v float64, labels ...core.KeyValue)
- func (p *CheckpointSet) AddGauge(desc *export.Descriptor, v float64, labels ...core.KeyValue)
- func (p *CheckpointSet) AddMeasure(desc *export.Descriptor, v float64, labels ...core.KeyValue)
- func (p *CheckpointSet) ForEach(f func(export.Record))
- func (p *CheckpointSet) Reset()
Types ¶
type CheckpointSet ¶
type CheckpointSet struct {
// contains filtered or unexported fields
}
func NewCheckpointSet ¶
func NewCheckpointSet(encoder export.LabelEncoder) *CheckpointSet
NewCheckpointSet returns a test CheckpointSet that new records could be added. Records are grouped by their LabelSet.
func (*CheckpointSet) Add ¶
func (p *CheckpointSet) Add(desc *export.Descriptor, newAgg export.Aggregator, labels ...core.KeyValue) (agg export.Aggregator, added bool)
Add a new descriptor to a Checkpoint.
If there is an existing record with the same descriptor and LabelSet the stored aggregator will be returned and should be merged.
func (*CheckpointSet) AddCounter ¶
func (p *CheckpointSet) AddCounter(desc *export.Descriptor, v float64, labels ...core.KeyValue)
func (*CheckpointSet) AddGauge ¶
func (p *CheckpointSet) AddGauge(desc *export.Descriptor, v float64, labels ...core.KeyValue)
func (*CheckpointSet) AddMeasure ¶
func (p *CheckpointSet) AddMeasure(desc *export.Descriptor, v float64, labels ...core.KeyValue)
func (*CheckpointSet) ForEach ¶
func (p *CheckpointSet) ForEach(f func(export.Record))
func (*CheckpointSet) Reset ¶
func (p *CheckpointSet) Reset()
Source Files ¶
test.go
- Version
- v0.2.3
- Published
- Mar 4, 2020
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 2 minutes ago –
Tools for package owners.