aspect

package
v0.0.0-...-f4f425e Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Orch8rionDirPathElement = filepath.Join("orch8rion", "src")

Orch8rionDirPathElement is the prefix for orch8rion source files in the build output directory.

View Source
var SyntheticPackageName = "synthetic"

SyntheticPackageName is the name of the synthetic package that will be created when the compilation of the main package is performed. This folder contains blank imports for all link-time dependencies that are not already in the build tree

Functions

This section is empty.

Types

type BehaviorOverride

type BehaviorOverride int
const (
	// NoOverride does not change the injector behavior, but prevents further
	// rules from being applied.
	NoOverride BehaviorOverride = iota
	// NeverWeave completely disables injecting into the designated package
	// path(s).
	NeverWeave
	// WeaveTracerInternal limits weaving to only aspects that have the
	// `tracer-internal` flag set.
	WeaveTracerInternal
)

func FindBehaviorOverride

func FindBehaviorOverride(importPath string) (BehaviorOverride, bool)

FindBehaviorOverride checks the import path against the weaver special cases and returns a potential special case

type Weaver

type Weaver struct {
	ImportPath string
}

func (Weaver) OnCompile

func (w Weaver) OnCompile(ctx context.Context, cmd *proxy.CompileCommand) (resErr error)

func (Weaver) OnCompileMain

func (w Weaver) OnCompileMain(ctx context.Context, cmd *proxy.CompileCommand) (err error)

OnCompileMain only performs changes when compiling the "main" package, adding blank imports for any linkdeps dependencies that are not yet satisfied by the importcfg file (this is the case for link-time dependencies implied by use of the go:linkname directive, which are used to avoid creating circular import dependencies). This ensures that the relevant packages' `init` (if any) are appropriately run, and that the linker automatically picks up these dependencies when creating the full binary.

func (w Weaver) OnLink(ctx context.Context, cmd *proxy.LinkCommand) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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