otelgo.opentelemetry.io/otel/api/distributedcontext Index | Files

package distributedcontext

import "go.opentelemetry.io/otel/api/distributedcontext"

Index

Functions

func Do

func Do(ctx context.Context, f func(ctx context.Context))

Note: the golang pprof.Do API forces this memory allocation, we should file an issue about that. (There's a TODO in the source.)

func NewContext

func NewContext(ctx context.Context, keyvalues ...core.KeyValue) context.Context

func WithMap

func WithMap(ctx context.Context, m Map) context.Context

Types

type Map

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

func FromContext

func FromContext(ctx context.Context) Map

func NewEmptyMap

func NewEmptyMap() Map

func NewMap

func NewMap(update MapUpdate) Map

func (Map) Apply

func (m Map) Apply(update MapUpdate) Map

func (Map) Foreach

func (m Map) Foreach(f func(kv core.KeyValue) bool)

func (Map) HasValue

func (m Map) HasValue(k core.Key) bool

func (Map) Len

func (m Map) Len() int

func (Map) Value

func (m Map) Value(k core.Key) (core.Value, bool)

type MapUpdate

type MapUpdate struct {
	SingleKV core.KeyValue
	MultiKV  []core.KeyValue
}

Source Files

context.go doc.go map.go

Version
v0.1.1
Published
Nov 15, 2019
Platform
windows/amd64
Imports
3 packages
Last checked
56 minutes ago

Tools for package owners.