Documentation
¶
Overview ¶
Package graph validates exact-type provider dependencies and builds a deterministic dependency-first provider construction order.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diagnostic ¶
type Diagnostic struct {
Position token.Position
PhysicalPosition token.Position
ProviderID string
Kind string
Message string
}
Diagnostic is one deterministic source-positioned graph failure.
func (Diagnostic) Error ¶
func (d Diagnostic) Error() string
Error renders a compiler-style diagnostic.
type Edge ¶
type Edge struct {
ConsumerID string
DependencyID string
RequiredTypeID string
ParameterIndex int
ParameterName string
DependencyKind provider.DependencyKind
CollectionIndex int
Position token.Position
PhysicalPosition token.Position
// contains filtered or unexported fields
}
Edge represents one provider parameter resolved to its exact provider.
func (Edge) Dependency ¶
Dependency returns a defensive copy of the dependency provider record.
type Node ¶
type Node struct {
ProviderID string
// contains filtered or unexported fields
}
Node represents one active bootstrap provider. Provider points at the exact record returned by the catalog used for Build.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result is the immutable-by-convention graph metadata for one provider catalog.
func Build ¶
Build validates exact provider dependencies from one already validated catalog. It never reloads source, inspects function bodies, or executes a provider. A catalog that already has diagnostics is not graphed.
func (Result) ConstructionOrder ¶
ConstructionOrder returns providers in deterministic dependency-first order. It is empty whenever Diagnostics is non-empty.
func (Result) Diagnostics ¶
func (r Result) Diagnostics() []Diagnostic
Diagnostics returns a defensive copy of deterministic graph diagnostics.