compiler

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRuntimeTasks

func BuildRuntimeTasks(analysisID int64, params map[string]any, dagDefinition map[string]any) (map[string]any, error)

Types

type ClassifyStage

type ClassifyStage struct{}

func (*ClassifyStage) Name

func (s *ClassifyStage) Name() string

func (*ClassifyStage) Run

func (s *ClassifyStage) Run(ctx *CompileContext) error

type CompileContext

type CompileContext struct {
	AnalysisID int64
	Params     map[string]any
	Dag        map[string]any
	Abort      bool

	Nodes []map[string]any
	Edges []map[string]any

	NodeMap   map[string]map[string]any
	Incoming  map[string][]map[string]any
	Outgoing  map[string][]map[string]any
	Order     []string
	NodeKind  map[string]string
	NodeLabel map[string][]string

	NodeSamplesMap map[string]map[string]map[string]any
	OutputCache    map[cacheKey]any
	NodeStates     map[string][]*NodeRuntimeState
	StateOrder     []*NodeRuntimeState

	AnalysisNodes []map[string]any
	AnalysisEdges []map[string]any
}

func NewCompileContext

func NewCompileContext(analysisID int64, params map[string]any, dagDefinition map[string]any) *CompileContext

type DecorateStage

type DecorateStage struct{}

func (*DecorateStage) Name

func (s *DecorateStage) Name() string

func (*DecorateStage) Run

func (s *DecorateStage) Run(ctx *CompileContext) error

type EdgeStage

type EdgeStage struct {
	// contains filtered or unexported fields
}

func (*EdgeStage) Name

func (s *EdgeStage) Name() string

func (*EdgeStage) Run

func (s *EdgeStage) Run(ctx *CompileContext) error

type EdgeStrategy

type EdgeStrategy interface {
	Build(ctx *CompileContext, nid string, node map[string]any, states []*NodeRuntimeState, builder *RuntimeEdgeBuilder) []map[string]any
}

type ExpandStage

type ExpandStage struct {
	// contains filtered or unexported fields
}

func (*ExpandStage) Name

func (s *ExpandStage) Name() string

func (*ExpandStage) Run

func (s *ExpandStage) Run(ctx *CompileContext) error

type NodeExpandStrategy

type NodeExpandStrategy interface {
	Expand(ctx *CompileContext, nid string, node map[string]any) ([]*NodeRuntimeState, error)
}

type NodeRuntimeState

type NodeRuntimeState struct {
	OriginalNodeID string
	Node           map[string]any
	Kind           string
	NodeIDBase     string
	NodeID         string
	NodeName       string
	ScriptID       string
	SampleLabel    string
	Sample         map[string]any
	Inputs         map[string]any
	Outputs        map[string]any
	NodeParams     map[string]any
	ResolvedInputs map[string]any
	ResolvedOutput map[string]any
	InputErrors    []string
	MaxRetry       int
}

type OutputStage

type OutputStage struct {
	// contains filtered or unexported fields
}

func (*OutputStage) Name

func (s *OutputStage) Name() string

func (*OutputStage) Run

func (s *OutputStage) Run(ctx *CompileContext) error

type ResolveStage

type ResolveStage struct {
	// contains filtered or unexported fields
}

func (*ResolveStage) Name

func (s *ResolveStage) Name() string

func (*ResolveStage) Run

func (s *ResolveStage) Run(ctx *CompileContext) error

type ResolveStrategy

type ResolveStrategy interface {
	Resolve(ctx *CompileContext, state *NodeRuntimeState) error
}

type RuntimeCompiler

type RuntimeCompiler struct {
	// contains filtered or unexported fields
}

func NewRuntimeCompiler

func NewRuntimeCompiler() *RuntimeCompiler

func (*RuntimeCompiler) Compile

func (c *RuntimeCompiler) Compile(analysisID int64, params map[string]any, dagDefinition map[string]any) (map[string]any, error)

type RuntimeEdgeBuilder

type RuntimeEdgeBuilder struct{}

func (*RuntimeEdgeBuilder) Build

func (b *RuntimeEdgeBuilder) Build(analysisID int64, sourceNode string, targetNode string, sourceHandle string, targetHandle string) map[string]any

type RuntimeNodeBuilder

type RuntimeNodeBuilder struct{}

func (*RuntimeNodeBuilder) Build

func (b *RuntimeNodeBuilder) Build(ctx *CompileContext, state *NodeRuntimeState) map[string]any

type SampleEdgeStrategy

type SampleEdgeStrategy struct{}

func (*SampleEdgeStrategy) Build

func (s *SampleEdgeStrategy) Build(ctx *CompileContext, nid string, node map[string]any, states []*NodeRuntimeState, builder *RuntimeEdgeBuilder) []map[string]any

type SampleExpandStrategy

type SampleExpandStrategy struct{}

func (*SampleExpandStrategy) Expand

func (s *SampleExpandStrategy) Expand(ctx *CompileContext, nid string, node map[string]any) ([]*NodeRuntimeState, error)

type SampleResolveStrategy

type SampleResolveStrategy struct{}

func (*SampleResolveStrategy) Resolve

type SingletonEdgeStrategy

type SingletonEdgeStrategy struct{}

func (*SingletonEdgeStrategy) Build

func (s *SingletonEdgeStrategy) Build(ctx *CompileContext, nid string, node map[string]any, states []*NodeRuntimeState, builder *RuntimeEdgeBuilder) []map[string]any

type SingletonExpandStrategy

type SingletonExpandStrategy struct{}

func (*SingletonExpandStrategy) Expand

func (s *SingletonExpandStrategy) Expand(ctx *CompileContext, nid string, node map[string]any) ([]*NodeRuntimeState, error)

type SingletonResolveStrategy

type SingletonResolveStrategy struct{}

func (*SingletonResolveStrategy) Resolve

type Stage

type Stage interface {
	Name() string
	Run(ctx *CompileContext) error
}

type TopologyStage

type TopologyStage struct{}

func (*TopologyStage) Name

func (s *TopologyStage) Name() string

func (*TopologyStage) Run

func (s *TopologyStage) Run(ctx *CompileContext) error

Jump to

Keyboard shortcuts

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