etrace

package
v1.45.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Async0

func Async0(ctx context.Context, cat, name string, fn func(context.Context))

func Async1

func Async1[A any](ctx context.Context, cat, name string, fn func(context.Context) A) A

func Async2

func Async2[A, B any](ctx context.Context, cat, name string, fn func(context.Context) (A, B)) (A, B)

func Sync0

func Sync0(ctx context.Context, cat, name string, fn func(context.Context))

func Sync1

func Sync1[A any](ctx context.Context, cat, name string, fn func(context.Context) A) A

func Sync2

func Sync2[A, B any](ctx context.Context, cat, name string, fn func(context.Context) (A, B)) (A, B)

Types

type Tracer

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

func WithFileTracer

func WithFileTracer(ctx context.Context, dst string) (context.Context, *Tracer, error)

func WithTracer

func WithTracer(ctx context.Context, w io.Writer) (context.Context, *Tracer)

func (*Tracer) Close

func (tr *Tracer) Close() error

func (*Tracer) Emit

func (tr *Tracer) Emit(typ eventType, name, category string, args map[string]any, gid int64, asyncID int64)

Jump to

Keyboard shortcuts

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