package distributedcontext
import "go.opentelemetry.io/otel/api/distributedcontext"
Index ¶
- func Do(ctx context.Context, f func(ctx context.Context))
- func NewContext(ctx context.Context, keyvalues ...core.KeyValue) context.Context
- func WithMap(ctx context.Context, m Map) context.Context
- type Map
- func FromContext(ctx context.Context) Map
- func NewEmptyMap() Map
- func NewMap(update MapUpdate) Map
- func (m Map) Apply(update MapUpdate) Map
- func (m Map) Foreach(f func(kv core.KeyValue) bool)
- func (m Map) HasValue(k core.Key) bool
- func (m Map) Len() int
- func (m Map) Value(k core.Key) (core.Value, bool)
- type MapUpdate
Functions ¶
func Do ¶
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 WithMap ¶
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func FromContext ¶
func NewEmptyMap ¶
func NewEmptyMap() Map
func NewMap ¶
func (Map) Apply ¶
func (Map) Foreach ¶
func (Map) HasValue ¶
func (Map) Len ¶
func (Map) Value ¶
type MapUpdate ¶
Source Files ¶
context.go doc.go map.go
- Version
- v0.1.0
- Published
- Nov 4, 2019
- Platform
- darwin/amd64
- Imports
- 3 packages
- Last checked
- 13 minutes ago –
Tools for package owners.