Documentation
¶
Overview ¶
Package compiler provides the GraphCompiler that transforms a GraphDefinition into a CompiledGraph with static analysis.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatWarnings ¶
FormatWarnings returns a human-readable string of all warnings.
Types ¶
type BuildOptions ¶
type BuildOptions struct{}
BuildOptions configures how the compiler processes a graph definition.
type CompiledGraph ¶
type CompiledGraph struct {
Graph *graph.RawGraph
NodeDefs []graph.NodeDefinition
EdgeDefs []graph.EdgeDefinition
Warnings []Warning
Metadata graph.GraphMeta
}
CompiledGraph is the result of compilation, containing the raw graph structure and analysis metadata. Nodes in RawGraph are passthrough placeholders; actual node construction is deferred to downstream Assemble + NodeFactory.
type Compiler ¶
type Compiler struct{}
Compiler transforms GraphDefinition into a CompiledGraph with static analysis. It is purely static — no runtime node instances are constructed.
func NewCompiler ¶
func NewCompiler(opts ...CompilerOption) *Compiler
NewCompiler creates a new Compiler with the given options.
func (*Compiler) Compile ¶
func (c *Compiler) Compile(def *graph.GraphDefinition, opts ...BuildOptions) (*CompiledGraph, error)
Compile transforms a GraphDefinition into a CompiledGraph. All nodes are represented as passthrough placeholders; the original definitions are preserved in NodeDefs/EdgeDefs for downstream NodeFactory construction.
type Warning ¶
type Warning struct {
Code string `json:"code"`
Message string `json:"message"`
NodeIDs []string `json:"node_ids,omitempty"`
}
Warning represents a non-fatal issue found during compilation.
func CheckPortCompatibility ¶
CheckPortCompatibility checks if connected nodes have compatible port types.