autoconfigure

package
v0.1.0-preview.8 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package autoconfigure discovers and statically decodes Go-native library auto-configuration. It never imports or executes application code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bean

type Bean struct {
	PackagePath     string
	Factory         string
	Name            string
	Aliases         []string
	Qualifiers      []string
	Primary         bool
	Fallback        bool
	Order           int64
	Position        token.Position
	SourceID        string
	SourceVersion   string
	Review          string
	ModulePath      string
	ModuleVersion   string
	ReplacementPath string
}

Bean is one statically decoded library-owned default factory.

type Configuration

type Configuration struct {
	PackagePath     string
	Position        token.Position
	Review          string
	ModulePath      string
	ModuleVersion   string
	ReplacementPath string
	Beans           []Bean
}

Configuration is one selected package descriptor.

func Decode

func Decode(program *load.Program, selected []string) ([]Configuration, error)

Decode statically decodes selected descriptors from the existing typed program. Descriptor functions and package initialization are never executed.

type Discovery

type Discovery struct {
	Packages []string
}

Discovery is the deterministic lexical preload input for one compiler operation. Packages are only candidates; Selected resolves actual imports from the typed primary program.

func Discover

func Discover(root string, overlay map[string][]byte) (Discovery, error)

Discover finds explicit blank imports of canonical autoconfigure packages before the single typed package load. Overlays replace matching disk files.

func (Discovery) Selected

func (discovery Discovery) Selected(program *load.Program) []string

Selected returns canonical blank imports that occur in typed primary source. Candidate imports from unselected workspace packages therefore cannot activate library behavior.

Jump to

Keyboard shortcuts

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