internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIncorrectRecord = errors.New("received incorrect record")

Functions

func KeyAsAttribute

func KeyAsAttribute(name string, key string) attribute.KeyValue

KeyAsAttribute format a DHT key into a suitable tracing attribute. DHT keys can be either valid utf-8 or binary, when they are derived from, for example, a multihash. Tracing (and notably OpenTelemetry+grpc exporter) requires valid utf-8 for string attributes.

func StartSpan

func StartSpan(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

Types

type CtxMutex

type CtxMutex chan struct{}

func NewCtxMutex

func NewCtxMutex() CtxMutex

func (CtxMutex) Lock

func (m CtxMutex) Lock(ctx context.Context) error

func (CtxMutex) Unlock

func (m CtxMutex) Unlock()

type LoggableProviderRecordBytes

type LoggableProviderRecordBytes []byte

func (LoggableProviderRecordBytes) String

func (lk LoggableProviderRecordBytes) String() string

type LoggableRecordKeyBytes

type LoggableRecordKeyBytes []byte

func (LoggableRecordKeyBytes) String

func (lk LoggableRecordKeyBytes) String() string

type LoggableRecordKeyString

type LoggableRecordKeyString string

func (LoggableRecordKeyString) String

func (lk LoggableRecordKeyString) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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