mock

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 3 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 Filter

type Filter struct {
	URLAndHeadersEvaluator func(span sdk.Span, url string, headers map[string][]string) bool
	BodyEvaluator          func(span sdk.Span, body []byte) bool
}

func (Filter) EvaluateBody

func (f Filter) EvaluateBody(span sdk.Span, body []byte) bool

func (Filter) EvaluateURLAndHeaders

func (f Filter) EvaluateURLAndHeaders(span sdk.Span, url string, headers map[string][]string) bool

type Span

type Span struct {
	Name       string
	Attributes map[string]interface{}
	Options    sdk.SpanOptions

	Noop bool
	// contains filtered or unexported fields
}

func NewSpan

func NewSpan() *Span

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)

Jump to

Keyboard shortcuts

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