Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unslice2

func Unslice2(sl interface{}) (one, two export.Aggregator)

    Takes a slice of []some.Aggregator and returns a slice of []export.Aggregator

    Types

    type CheckpointSet

    type CheckpointSet struct {
    	sync.RWMutex
    	// contains filtered or unexported fields
    }

      CheckpointSet is useful for testing Exporters. TODO(#872): Uses of this can be replaced by processortest.Output.

      func NewCheckpointSet

      func NewCheckpointSet(resource *resource.Resource) *CheckpointSet

        NewCheckpointSet returns a test CheckpointSet that new records could be added. Records are grouped by their encoded labels.

        func (*CheckpointSet) Add

        func (p *CheckpointSet) Add(desc *metric.Descriptor, newAgg export.Aggregator, labels ...attribute.KeyValue) (agg export.Aggregator, added bool)

          Add a new record to a CheckpointSet.

          If there is an existing record with the same descriptor and labels, the stored aggregator will be returned and should be merged.

          func (*CheckpointSet) ForEach

            ForEach does not use ExportKindSelected: use a real Processor to test ExportKind functionality.

            func (*CheckpointSet) Reset

            func (p *CheckpointSet) Reset()

              Reset clears the Aggregator state.

              type NoopAggregator

              type NoopAggregator struct{}

                NoopAggregator is useful for testing Exporters.

                func (NoopAggregator) Aggregation

                func (NoopAggregator) Aggregation() aggregation.Aggregation

                  Aggregation returns an interface for reading the state of this aggregator.

                  func (NoopAggregator) Kind

                    Kind implements aggregation.Aggregation.

                    func (NoopAggregator) Merge

                      Merge implements export.Aggregator.

                      func (NoopAggregator) SynchronizedMove

                      func (NoopAggregator) SynchronizedMove(export.Aggregator, *metric.Descriptor) error

                        SynchronizedMove implements export.Aggregator.

                        func (NoopAggregator) Update

                          Update implements export.Aggregator.

                          Source Files