graph

package
v0.22.5 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildNodeTypeSchema

func BuildNodeTypeSchema(node nodes.Node) schema.NodeType

func RecurseDependenciesType

func RecurseDependenciesType[T any](dependent nodes.Dependent) []T

Types

type CustomGraphSerialization

type CustomGraphSerialization interface {
	ToJSON(encoder *jbtf.Encoder) ([]byte, error)
	FromJSON(decoder jbtf.Decoder, body []byte) error
}

type Instance

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

func New

func New(typeFactory *refutil.TypeFactory) *Instance

func (*Instance) AddProducer

func (i *Instance) AddProducer(producerName string, producer nodes.NodeOutput[artifact.Artifact])

func (*Instance) ApplyAppSchema

func (i *Instance) ApplyAppSchema(jsonPayload []byte) error

func (*Instance) Artifact

func (i *Instance) Artifact(producerName string) artifact.Artifact

func (*Instance) ConnectNodes

func (i *Instance) ConnectNodes(nodeOutId, outPortName, nodeInId, inPortName string)

func (*Instance) CreateNode

func (i *Instance) CreateNode(nodeType string) (nodes.Node, string, error)

func (*Instance) DeleteMetadata

func (i *Instance) DeleteMetadata(key string)

func (*Instance) DeleteNode

func (i *Instance) DeleteNode(nodeId string)

func (*Instance) DeleteNodeInputConnection

func (i *Instance) DeleteNodeInputConnection(nodeId, portName string)

func (*Instance) EncodeToAppSchema

func (i *Instance) EncodeToAppSchema(appSchema *schema.App, encoder *jbtf.Encoder)

func (*Instance) InitializeParameters

func (i *Instance) InitializeParameters(set *flag.FlagSet)

func (*Instance) ModelVersion

func (i *Instance) ModelVersion() uint32

func (*Instance) Node

func (i *Instance) Node(nodeId string) nodes.Node

func (*Instance) NodeId

func (i *Instance) NodeId(node nodes.Node) string

func (*Instance) NodeInstanceSchema

func (i *Instance) NodeInstanceSchema(node nodes.Node) schema.NodeInstance

func (*Instance) Parameter

func (i *Instance) Parameter(nodeId string) Parameter

func (*Instance) ParameterData

func (i *Instance) ParameterData(nodeId string) []byte

func (*Instance) Producer

func (i *Instance) Producer(producerName string) nodes.NodeOutput[artifact.Artifact]

func (*Instance) ProducerNames

func (i *Instance) ProducerNames() []string

func (*Instance) Reset added in v0.22.2

func (i *Instance) Reset()

func (*Instance) Schema

func (i *Instance) Schema() schema.GraphInstance

func (*Instance) SetMetadata

func (i *Instance) SetMetadata(key string, value any)

func (*Instance) SetNodeAsProducer

func (i *Instance) SetNodeAsProducer(nodeId, producerName string)

func (*Instance) UpdateParameter

func (i *Instance) UpdateParameter(nodeId string, data []byte) (bool, error)

type Parameter

type Parameter interface {
	DisplayName() string
	Schema() schema.Parameter
	InitializeForCLI(set *flag.FlagSet)
	SetName(name string)
	SetDescription(name string)

	ApplyMessage(msg []byte) (bool, error)
	ToMessage() []byte
}

type SwaggerParameter

type SwaggerParameter interface {
	Parameter

	SwaggerProperty() swagger.Property
}

Jump to

Keyboard shortcuts

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