trace

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithTrace

func WithTrace(ctx context.Context, t Trace) context.Context

WithTrace returns context which has associated Trace with it.

Types

type DialDoneInfo

type DialDoneInfo struct {
	Context context.Context
	Error   error
}

type DialStartInfo

type DialStartInfo struct {
	Context context.Context
}

type Trace

type Trace struct {
	OnDial func(DialStartInfo) func(DialDoneInfo)
}

func ContextTrace

func ContextTrace(ctx context.Context) Trace

ContextTrace returns Trace associated with x. If there is no Trace associated with x then zero value of Trace is returned.

func (Trace) Compose

func (t Trace) Compose(x Trace) (ret Trace)

Compose returns a new Trace which has functional fields composed both from t and x.

Jump to

Keyboard shortcuts

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