mock

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 4 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{}

type Filter

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

func (Filter) Evaluate added in v0.7.0

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

func (Filter) EvaluateBody

func (f Filter) EvaluateBody(span sdk.Span, body []byte, headers map[string][]string) 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
	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) 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