subgraph

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InputNodeTypeKey  = "github.com/EliCDavis/polyform/generator/subgraph.InputNode"
	OutputNodeTypeKey = "github.com/EliCDavis/polyform/generator/subgraph.OutputNode"

	RuntimeTypePrefix = "subgraph/"
)
View Source
const (
	ValuePortName = "Value"
)

Variables

This section is empty.

Functions

func BoundaryPortNameConfigured

func BoundaryPortNameConfigured(boundary Boundary) bool

func ConfigureBoundaryPortType

func ConfigureBoundaryPortType(boundary Boundary, portType string) error

func DiscoverNodePortTypes

func DiscoverNodePortTypes(node nodes.Node)

DiscoverNodePortTypes indexes the value types produced by a single node's output ports.

func DiscoverPortTypes

func DiscoverPortTypes(factory *refutil.TypeFactory)

DiscoverPortTypes scans every node registered with the factory and indexes the value types their output ports produce, so those types can be used as sub-graph boundary port types without manual registration.

func IsPortTypeKnown

func IsPortTypeKnown(portType string) bool

IsPortTypeKnown reports whether boundary ports of the given type can be exposed as strongly typed outputs.

func IsRuntimeNodeType

func IsRuntimeNodeType(typeName string) bool

func KnownPortTypes

func KnownPortTypes() []string

KnownPortTypes returns every discovered port type, sorted. These are the types sub-graph boundary nodes can be created with.

func LookupPortTypeProxy

func LookupPortTypeProxy(portType string) (nodes.ProxyOutputBuilder, bool)

LookupPortTypeProxy returns a builder capable of constructing a strongly typed output port for the given port type, if one has been discovered.

func RuntimeTypeID

func RuntimeTypeID(typeName string) string

func RuntimeTypePath

func RuntimeTypePath(subGraphID string) string

Types

type Boundary

type Boundary interface {
	nodes.Node
	BoundaryPortName() string
	BoundaryPortType() string
}

func IsBoundaryNode

func IsBoundaryNode(node nodes.Node) (Boundary, bool)

type InputBoundary

type InputBoundary interface {
	Boundary
	SetExternalSource(port nodes.OutputPort)
	ExternalSource() nodes.OutputPort
}

func IsInputBoundary

func IsInputBoundary(node nodes.Node) (InputBoundary, bool)

type InputNode

type InputNode struct {
	PortName string
	PortType string
	// contains filtered or unexported fields
}

func NewInputNode

func NewInputNode(portName, portType string) *InputNode

func (*InputNode) BoundaryPortName

func (n *InputNode) BoundaryPortName() string

func (*InputNode) BoundaryPortType

func (n *InputNode) BoundaryPortType() string

func (*InputNode) ExternalSource

func (n *InputNode) ExternalSource() nodes.OutputPort

func (*InputNode) FromJSON

func (n *InputNode) FromJSON(decoder jbtf.Decoder, body []byte) error

func (*InputNode) Inputs

func (n *InputNode) Inputs() map[string]nodes.InputPort

func (*InputNode) Name

func (n *InputNode) Name() string

func (*InputNode) Outputs

func (n *InputNode) Outputs() map[string]nodes.OutputPort

func (*InputNode) SetExternalSource

func (n *InputNode) SetExternalSource(port nodes.OutputPort)

func (*InputNode) ToJSON

func (n *InputNode) ToJSON(encoder *jbtf.Encoder) ([]byte, error)

type OutputNode

type OutputNode struct {
	PortName string
	PortType string
	// contains filtered or unexported fields
}

func NewOutputNode

func NewOutputNode(portName, portType string) *OutputNode

func (*OutputNode) BoundaryPortName

func (n *OutputNode) BoundaryPortName() string

func (*OutputNode) BoundaryPortType

func (n *OutputNode) BoundaryPortType() string

func (*OutputNode) ConnectedSource

func (n *OutputNode) ConnectedSource() nodes.OutputPort

func (*OutputNode) FromJSON

func (n *OutputNode) FromJSON(decoder jbtf.Decoder, body []byte) error

func (*OutputNode) Inputs

func (n *OutputNode) Inputs() map[string]nodes.InputPort

func (*OutputNode) Name

func (n *OutputNode) Name() string

func (*OutputNode) Outputs

func (n *OutputNode) Outputs() map[string]nodes.OutputPort

func (*OutputNode) ToJSON

func (n *OutputNode) ToJSON(encoder *jbtf.Encoder) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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