Documentation ¶
Index ¶
- Variables
- type MockContextKeyValue
- type MockEvent
- type MockSpan
- func (s *MockSpan) AddEvent(name string, o ...trace.EventOption)
- func (s *MockSpan) End(options ...trace.SpanEndOption)
- func (s *MockSpan) IsRecording() bool
- func (s *MockSpan) OverrideTracer(tracer trace.Tracer)
- func (s *MockSpan) RecordError(err error, opts ...trace.EventOption)
- func (s *MockSpan) SetAttributes(attributes ...attribute.KeyValue)
- func (s *MockSpan) SetError(v bool)
- func (s *MockSpan) SetName(name string)
- func (s *MockSpan) SetStatus(code codes.Code, msg string)
- func (s *MockSpan) SpanContext() trace.SpanContext
- func (s *MockSpan) Tracer() trace.Tracer
- func (s *MockSpan) TracerProvider() trace.TracerProvider
- type MockTracer
- type MockTracerProvider
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type MockContextKeyValue ¶
type MockContextKeyValue struct { Key interface{} Value interface{} }
type MockSpan ¶
type MockSpan struct { SpanKind trace.SpanKind Name string Attributes []attribute.KeyValue StartTime time.Time EndTime time.Time ParentSpanID trace.SpanID Events []MockEvent // contains filtered or unexported fields }
func (*MockSpan) End ¶
func (s *MockSpan) End(options ...trace.SpanEndOption)
func (*MockSpan) IsRecording ¶
func (*MockSpan) OverrideTracer ¶
func (*MockSpan) RecordError ¶
func (s *MockSpan) RecordError(err error, opts ...trace.EventOption)
func (*MockSpan) SetAttributes ¶
func (*MockSpan) SpanContext ¶
func (s *MockSpan) SpanContext() trace.SpanContext
func (*MockSpan) TracerProvider ¶
func (s *MockSpan) TracerProvider() trace.TracerProvider
type MockTracer ¶
type MockTracer struct { FinishedSpans []*MockSpan SpareTraceIDs []trace.TraceID SpareSpanIDs []trace.SpanID SpareContextKeyValues []MockContextKeyValue // contains filtered or unexported fields }
func NewMockTracer ¶
func NewMockTracer() *MockTracer
func (*MockTracer) DeferredContextSetupHook ¶
func (*MockTracer) Reset ¶
func (t *MockTracer) Reset()
type MockTracerProvider ¶
type MockTracerProvider struct {
// contains filtered or unexported fields
}
func NewMockTraceProvider ¶
func NewMockTraceProvider() *MockTracerProvider
func (*MockTracerProvider) Tracer ¶
func (m *MockTracerProvider) Tracer(_ string, _ ...trace.TracerOption) trace.Tracer
Click to show internal directories.
Click to hide internal directories.