Documentation
¶
Index ¶
- Constants
- func BoundaryPortNameConfigured(boundary Boundary) bool
- func ConfigureBoundaryPortType(boundary Boundary, portType string) error
- func DiscoverNodePortTypes(node nodes.Node)
- func DiscoverPortTypes(factory *refutil.TypeFactory)
- func IsPortTypeKnown(portType string) bool
- func IsRuntimeNodeType(typeName string) bool
- func KnownPortTypes() []string
- func LookupPortTypeProxy(portType string) (nodes.ProxyOutputBuilder, bool)
- func RuntimeTypeID(typeName string) string
- func RuntimeTypePath(subGraphID string) string
- type Boundary
- type InputBoundary
- type InputNode
- func (n *InputNode) BoundaryPortName() string
- func (n *InputNode) BoundaryPortType() string
- func (n *InputNode) ExternalSource() nodes.OutputPort
- func (n *InputNode) FromJSON(decoder jbtf.Decoder, body []byte) error
- func (n *InputNode) Inputs() map[string]nodes.InputPort
- func (n *InputNode) Name() string
- func (n *InputNode) Outputs() map[string]nodes.OutputPort
- func (n *InputNode) SetExternalSource(port nodes.OutputPort)
- func (n *InputNode) ToJSON(encoder *jbtf.Encoder) ([]byte, error)
- type OutputNode
- func (n *OutputNode) BoundaryPortName() string
- func (n *OutputNode) BoundaryPortType() string
- func (n *OutputNode) ConnectedSource() nodes.OutputPort
- func (n *OutputNode) FromJSON(decoder jbtf.Decoder, body []byte) error
- func (n *OutputNode) Inputs() map[string]nodes.InputPort
- func (n *OutputNode) Name() string
- func (n *OutputNode) Outputs() map[string]nodes.OutputPort
- func (n *OutputNode) ToJSON(encoder *jbtf.Encoder) ([]byte, error)
Constants ¶
const ( InputNodeTypeKey = "github.com/EliCDavis/polyform/generator/subgraph.InputNode" OutputNodeTypeKey = "github.com/EliCDavis/polyform/generator/subgraph.OutputNode" RuntimeTypePrefix = "subgraph/" )
const (
ValuePortName = "Value"
)
Variables ¶
This section is empty.
Functions ¶
func DiscoverNodePortTypes ¶
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 ¶
IsPortTypeKnown reports whether boundary ports of the given type can be exposed as strongly typed outputs.
func IsRuntimeNodeType ¶
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 RuntimeTypePath ¶
Types ¶
type InputBoundary ¶
type InputBoundary interface {
Boundary
SetExternalSource(port nodes.OutputPort)
ExternalSource() nodes.OutputPort
}
func IsInputBoundary ¶
func IsInputBoundary(node nodes.Node) (InputBoundary, bool)
type InputNode ¶
func NewInputNode ¶
func (*InputNode) BoundaryPortName ¶
func (*InputNode) BoundaryPortType ¶
func (*InputNode) ExternalSource ¶
func (n *InputNode) ExternalSource() nodes.OutputPort
func (*InputNode) SetExternalSource ¶
func (n *InputNode) SetExternalSource(port nodes.OutputPort)
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) Name ¶
func (n *OutputNode) Name() string
func (*OutputNode) Outputs ¶
func (n *OutputNode) Outputs() map[string]nodes.OutputPort