instrumenter

package
v0.0.0-...-e70b96e Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultInstrumentation

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

func (*DefaultInstrumentation) AddFile

func (e *DefaultInstrumentation) AddFile(src string) error

func (*DefaultInstrumentation) Instrument

func (e *DefaultInstrumentation) Instrument() ([]*dst.File, error)

func (*DefaultInstrumentation) IsIgnored

func (e *DefaultInstrumentation) IsIgnored() bool

func (*DefaultInstrumentation) WriteExtraFiles

func (e *DefaultInstrumentation) WriteExtraFiles(pkgName string) ([]string, error)

func (*DefaultInstrumentation) WriteInstrumentedFiles

func (e *DefaultInstrumentation) WriteInstrumentedFiles(packageBuildDir string, instrumentedFiles []*dst.File) (srcast map[string]string, err error)

type IgnoreInstrumentation

type IgnoreInstrumentation struct {
}

func (IgnoreInstrumentation) AddFile

func (i IgnoreInstrumentation) AddFile(src string) error

func (IgnoreInstrumentation) Instrument

func (i IgnoreInstrumentation) Instrument() ([]*dst.File, error)

func (IgnoreInstrumentation) IsIgnored

func (i IgnoreInstrumentation) IsIgnored() bool

func (IgnoreInstrumentation) WriteExtraFiles

func (i IgnoreInstrumentation) WriteExtraFiles(pkgName string) ([]string, error)

func (IgnoreInstrumentation) WriteInstrumentedFiles

func (i IgnoreInstrumentation) WriteInstrumentedFiles(packageBuildDir string, instrumented []*dst.File) (map[string]string, error)

type Instrumenter

type Instrumenter interface {
	IsIgnored() bool
	AddFile(src string) error
	Instrument() ([]*dst.File, error)
	WriteInstrumentedFiles(packageBuildDir string, instrumented []*dst.File) (srcdst map[string]string, err error)
	WriteExtraFiles(pkgName string) ([]string, error)
}

func NewDefaultInstrumentation

func NewDefaultInstrumentation(pkgPath string, packageBuildDir string) Instrumenter

func NewIgnoreInstrumentation

func NewIgnoreInstrumentation() Instrumenter

func NewMainInstrumentation

func NewMainInstrumentation(pkgPath string, packageBuildDir string) Instrumenter

type MainInstrumentation

type MainInstrumentation struct {
	*DefaultInstrumentation
}

func (*MainInstrumentation) WriteExtraFiles

func (e *MainInstrumentation) WriteExtraFiles(pkgName string) ([]string, error)

Jump to

Keyboard shortcuts

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