dependency

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Processor

func Processor(s Specifier) generic.Processor

Processor returns a generic processor that will resolve relationships between packages based on the dependency claims.

func Resolve added in v1.6.0

func Resolve(specifier Specifier, pkgs []pkg.Package) (relationships []artifact.Relationship)

Resolve will create relationships between packages based on the dependency claims of each package.

Types

type ProvidesRequires added in v1.6.0

type ProvidesRequires struct {
	// Provides holds a list of abstract resources that this package provides for other packages.
	Provides []string

	// Requires holds a list of abstract resources that this package requires from other packages.
	Requires []string
}

type Specification

type Specification struct {
	ProvidesRequires

	// Variants allows for specifying multiple sets of provides/requires for a single package. This is useful
	// in cases when you have conditional optional dependencies for a package.
	Variants []ProvidesRequires
}

Specification holds strings that indicate abstract resources that a package provides for other packages and requires for itself. These strings can represent anything from file paths, package names, or any other concept that is useful for dependency resolution within that packing ecosystem.

type Specifier

type Specifier func(pkg.Package) Specification

Specifier is a function that takes a package and extracts a Specification, describing resources the package provides and needs.

Jump to

Keyboard shortcuts

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