trace

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package trace provides a mockable wrapper for runtime/trace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) IsEnabled

func (*Impl) IsEnabled() bool

func (*Impl) Log

func (*Impl) Log(ctx context.Context, category string, message string)

func (*Impl) Logf

func (*Impl) Logf(ctx context.Context, category string, format string, args ...any)

func (*Impl) NewTask

func (*Impl) NewTask(pctx context.Context, taskType string) (ctx context.Context, task *trace.Task)

func (*Impl) Start

func (*Impl) Start(w io.Writer) error

func (*Impl) StartRegion

func (*Impl) StartRegion(ctx context.Context, regionType string) *trace.Region

func (*Impl) Stop

func (*Impl) Stop()

func (*Impl) WithRegion

func (*Impl) WithRegion(ctx context.Context, regionType string, fn func())

type Interface

type Interface interface {
	IsEnabled() bool
	Log(ctx context.Context, category string, message string)
	Logf(ctx context.Context, category string, format string, args ...any)
	NewTask(pctx context.Context, taskType string) (ctx context.Context, task *trace.Task)
	Start(w io.Writer) error
	StartRegion(ctx context.Context, regionType string) *trace.Region
	Stop()
	WithRegion(ctx context.Context, regionType string, fn func())
}

Jump to

Keyboard shortcuts

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