Documentation ¶
Index ¶
- func DP() *datapoint.Datapoint
- func E() *event.Event
- func ExactlyOne(dps []*datapoint.Datapoint, metricName string) *datapoint.Datapoint
- func ExactlyOneDims(dps []*datapoint.Datapoint, metricName string, dims map[string]string) *datapoint.Datapoint
- func S() *trace.Span
- type BasicSink
- func (f *BasicSink) AddDatapoints(ctx context.Context, points []*datapoint.Datapoint) error
- func (f *BasicSink) AddEvents(ctx context.Context, points []*event.Event) error
- func (f *BasicSink) AddSpans(ctx context.Context, points []*trace.Span) error
- func (f *BasicSink) Next() *datapoint.Datapoint
- func (f *BasicSink) NextEvent() *event.Event
- func (f *BasicSink) NextSpan() *trace.Span
- func (f *BasicSink) Resize(size int)
- func (f *BasicSink) RetError(err error)
- type DatapointSource
- type EventSource
- type SpanSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExactlyOne ¶
ExactlyOne returns the datapoint with metricName and panics if there is not exactly one in dps
Types ¶
type BasicSink ¶
type BasicSink struct { RetErr error PointsChan chan []*datapoint.Datapoint EventsChan chan []*event.Event TracesChan chan []*trace.Span // contains filtered or unexported fields }
BasicSink is a pure testing sink that blocks forwarded points onto a channel
func NewBasicSink ¶
func NewBasicSink() *BasicSink
NewBasicSink creates a BasicSink with an unbuffered chan. Note, calls to AddDatapoints will then block until you drain the PointsChan.
func (*BasicSink) AddDatapoints ¶
AddDatapoints buffers the point on an internal chan or returns errors if RetErr is set
func (*BasicSink) AddEvents ¶
AddEvents buffers the event on an internal chan or returns errors if RetErr is set
func (*BasicSink) AddSpans ¶ added in v1.1.5
AddSpans buffers the trace on an internal chan or returns errors if RetErr is set
func (*BasicSink) Next ¶
Next returns a single datapoint from the top of PointsChan and panics if the top doesn't contain only one point
func (*BasicSink) NextEvent ¶
NextEvent returns a single event from the top of EventsChan and panics if the top doesn't contain only one event
func (*BasicSink) NextSpan ¶
NextSpan returns a single span from the top of TracesChan and panics if the top doesn't contain only one span
type DatapointSource ¶
type DatapointSource struct { CurrentIndex int64 Metric string Dims map[string]string Dptype datapoint.MetricType TimeSource func() time.Time // contains filtered or unexported fields }
DatapointSource is a simple way to generate throw away datapoints
func (*DatapointSource) Next ¶
func (d *DatapointSource) Next() *datapoint.Datapoint
Next returns a unique datapoint
type EventSource ¶
type EventSource struct { CurrentIndex int64 EventType string Category event.Category Dims map[string]string Meta map[string]interface{} TimeSource func() time.Time // contains filtered or unexported fields }
EventSource is a simple way to generate throw away events
type SpanSource ¶
type SpanSource struct { TimeSource func() int64 Name string CurrentIndex int64 // contains filtered or unexported fields }
SpanSource is a simple way to generate throw away spans