tracertest

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2018 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareSpan

func CompareSpan(t *testing.T, expectedSpan, actualSpan *tracer.Span, debug ...bool)

Test strict equality between the most important fields of the two spans

func CopySpan

func CopySpan(span *tracer.Span, trc *tracer.Tracer) *tracer.Span

CopySpan returns a new span with the same fields of the copied one. This function is necessary because the usual assignment copies the mutex address and then the use of the copied span can conflict with the original one when concurent calls.

Types

type DummyTransport

type DummyTransport struct {
	// contains filtered or unexported fields
}

dummyTransport is a transport that just buffers spans and encoding

func GetTestTracer

func GetTestTracer() (*tracer.Tracer, *DummyTransport)

Return a Tracer with a DummyTransport

func (*DummyTransport) SendServices

func (t *DummyTransport) SendServices(services map[string]tracer.Service) (*http.Response, error)

func (*DummyTransport) SendTraces

func (t *DummyTransport) SendTraces(traces [][]*tracer.Span) (*http.Response, error)

func (*DummyTransport) SetHeader

func (t *DummyTransport) SetHeader(key, value string)

func (*DummyTransport) Traces

func (t *DummyTransport) Traces() [][]*tracer.Span

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL