installresolver

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package installresolver is Pig's product-neutral seam for contributed package-source behavior. Optional catalog/product packages register through it so generic Pig packages (for example the piglet schema package) and the plugin-update path do not import a concrete product package.

The registry carries product-neutral piglet-origin, materialization, and package-reinstall callbacks.

pig additive (D18): product-neutral install and Piglet source resolver seams.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(cwd, source, scope string, stdout, stderr io.Writer) error

Install reinstalls a package source through the registered core installer.

func Materialize

func Materialize(cwd, source, scope string, stdout, stderr io.Writer) (string, error)

Materialize resolves one source without mutating Package settings.

func RegisterPigletSourceResolver

func RegisterPigletSourceResolver(scheme string, resolver PigletSourceResolver) error

RegisterPigletSourceResolver registers one exact typed source scheme.

func RegisterSourceScheme

func RegisterSourceScheme(scheme string) error

RegisterSourceScheme claims one explicit package/piglet source scheme. Duplicate claims are rejected so a source never depends on import order.

func ResolvePigletSource

func ResolvePigletSource(cwd, source string) (string, error)

ResolvePigletSource dispatches one typed source to its exact scheme owner.

func SetInstaller

func SetInstaller(installer Installer)

SetInstaller supplies the core package installer callback used when a contributed command needs to reinstall one of its recorded sources.

func SetMaterializer

func SetMaterializer(materializer Materializer)

SetMaterializer supplies the side-effect-free package source materializer.

func SupportsSourceScheme

func SupportsSourceScheme(scheme string) bool

SupportsSourceScheme reports whether a contributed resolver claimed scheme.

Types

type Installer

type Installer func(cwd, source, scope string, stdout, stderr io.Writer) error

Installer reinstalls one recorded package source through the core install pipeline.

type Materializer

type Materializer func(cwd, source, scope string, stdout, stderr io.Writer) (root string, err error)

Materializer resolves one source to a local root without adding it to Package settings or activating any resources. Piglets use this path for dependencies.

type PigletSourceResolver

type PigletSourceResolver func(cwd, locator string) (root string, err error)

PigletSourceResolver acquires one typed Piglet source. The resolver is registered by source scheme and receives the opaque locator after the colon.

Jump to

Keyboard shortcuts

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