sdk

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sdk provides an optional pure Go frontend for generated graphs and repository tests. It emits the same syntax AST consumed by the normative language-neutral compiler and never mounts resources itself.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect[T any](builder *Builder, from Out[T], to In[T], options ...ConnectOption)

Connect adds one explicit, lossless edge unless an option selects loss.

func ExportInput

func ExportInput[T any](builder *Builder, name string, input In[T])

func ExportOutput

func ExportOutput[T any](builder *Builder, name string, output Out[T])

func Lossy

func Lossy(edge *syntax.Edge)

Types

type Builder

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

func New

func New(name string) *Builder

func (*Builder) Add

func (builder *Builder) Add(name, elementReference string) Node

Add instantiates one symbolic descriptor and returns its typed-port anchor.

func (*Builder) Compile

func (builder *Builder) Compile(options graphcompiler.Options) (graphcompiler.Result, error)

Compile uses the same normative elaborator as declarative frontends.

func (*Builder) File

func (builder *Builder) File() (syntax.File, error)

File returns the frontend-neutral AST in declaration order.

func (*Builder) Nodes

func (builder *Builder) Nodes() []string

Nodes returns stable instance names for generator diagnostics.

func (*Builder) Source

func (builder *Builder) Source() (string, error)

Source emits canonical `.ortg` for review or deployment.

type ConnectOption

type ConnectOption func(*syntax.Edge)

func Named

func Named(name string) ConnectOption

type In

type In[T any] struct {
	// contains filtered or unexported fields
}

In and Out are phantom-typed port handles. The host compiler catches an accidental mismatch between handles; the graph compiler still verifies their claims against resolved descriptors.

func Input

func Input[T any](node Node, port string) In[T]

type Node

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

type Out

type Out[T any] struct {
	// contains filtered or unexported fields
}

func Output

func Output[T any](node Node, port string) Out[T]

Jump to

Keyboard shortcuts

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