Help us shape the future of Go! Take the 2026 Go Developer Survey

linktypes

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeclaredLinkGraph

type DeclaredLinkGraph interface {
	// Edges returns all the edges in the declared link graph.
	Edges() []*ResolvedLink
	// EdgesFrom returns the edges in the graph that have the given resource as the source.
	EdgesFrom(resourceName string) []*ResolvedLink
	// EdgesTo returns the edges in the graph that have the given resource as the target.
	EdgesTo(resourceName string) []*ResolvedLink
	// Resource looks up a resource by name in the graph and returns the resource schema,
	// its classification as concrete or abstract, and whether it was found.
	Resource(name string) (*schema.Resource, ResourceClass, bool)
}

DeclaredLinkGraph represents a graph of declared links within a blueprint, allowing for analysis of link relationships without needing to resolve them.

type ResolvedLink struct {
	// The source resource name.
	Source string
	// The target resource name.
	Target string
	// The source resource type.
	SourceType string
	// The target resource type.
	TargetType string
	// The label keys that matched.
	// In the form "label::<key>:<value>" as per the
	// selector keys generated by GroupResourcesBySelector.
	SelectorKeys []string
}

ResolvedLink represents a link between two resources in the declared link graph.

type ResourceClass

type ResourceClass string

ResourceClass represents the classification of a resource in the context of a declared link graph.

const (
	// ResourceClassConcrete represents a resource that is a concrete resource implemented
	// by a provider plugin.
	ResourceClassConcrete ResourceClass = "concrete"
	// ResourceClassAbstract represents a resource that is an abstract resource defined
	// in a transformer plugin.
	ResourceClassAbstract ResourceClass = "abstract"
)

Jump to

Keyboard shortcuts

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