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 ¶
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" )
Click to show internal directories.
Click to hide internal directories.