mock

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithSpan

func ContextWithSpan(ctx context.Context, s sdk.Span) context.Context

func SpanFromContext

func SpanFromContext(ctx context.Context) sdk.Span

func StartSpan

func StartSpan(ctx context.Context, name string, opts *sdk.SpanOptions) (context.Context, sdk.Span, func())

Types

type AttributeList added in v0.6.0

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

func (*AttributeList) GetValue added in v0.6.0

func (l *AttributeList) GetValue(key string) interface{}

func (*AttributeList) Iterate added in v0.16.0

func (l *AttributeList) Iterate(yield func(key string, value interface{}) bool)

func (*AttributeList) Len added in v0.16.0

func (l *AttributeList) Len() int

type Filter

type Filter struct {
	Evaluator func(span sdk.Span) result.FilterResult
}

func (Filter) Evaluate added in v0.7.0

func (f Filter) Evaluate(span sdk.Span) result.FilterResult

type Span

type Span struct {
	Name       string
	Attributes map[string]interface{}
	Options    sdk.SpanOptions
	Err        error
	Noop       bool
	Status     Status
	// contains filtered or unexported fields
}

func NewSpan

func NewSpan() *Span

func (*Span) AddEvent added in v0.6.0

func (s *Span) AddEvent(name string, ts time.Time, attributes map[string]interface{})

func (*Span) GetAttributes added in v0.6.0

func (s *Span) GetAttributes() sdk.AttributeList

func (*Span) GetSpanId added in v0.19.0

func (s *Span) GetSpanId() string

This function has no use, it has been added just so that the interface in sdk/span.go remains implemented

func (*Span) IsNoop

func (s *Span) IsNoop() bool

func (*Span) ReadAttribute

func (s *Span) ReadAttribute(key string) interface{}

func (*Span) RemainingAttributes

func (s *Span) RemainingAttributes() int

func (*Span) SetAttribute

func (s *Span) SetAttribute(key string, value interface{})

func (*Span) SetError

func (s *Span) SetError(err error)

func (*Span) SetStatus added in v0.5.0

func (s *Span) SetStatus(code sdk.Code, description string)

type Status added in v0.5.0

type Status struct {
	Code    sdk.Code
	Message string
}

Jump to

Keyboard shortcuts

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