Help us shape the future of Go! Take the 2026 Go Developer Survey

remote

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: BSD-2-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwaitsCallback added in v0.2.0

func AwaitsCallback(result models.NodeResult) bool

AwaitsCallback reports whether result is a remote node waiting for its service to call back, which only an answer naming a port can resume.

func CallbackAllowed

func CallbackAllowed(result models.NodeResult, token string) bool

CallbackAllowed reports whether token is the callback token handed out with the call that left result waiting.

func Normalize

func Normalize(nodeType *models.RemoteNodeType)

func Prepare

func Prepare(nodeType *models.RemoteNodeType) error

Prepare validates a node type the way the platform API accepts it and fills its defaults.

Types

type Node

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

func New

func New(nodeType models.RemoteNodeType, id string, config map[string]any, client *http.Client, callbackBase string) *Node

func (*Node) Execute

func (n *Node) Execute(execution models.ExecutionContext, inputs map[string]models.NodeResult) (map[string]models.NodeResult, error)

func (*Node) ID

func (n *Node) ID() string

func (*Node) InputPorts

func (n *Node) InputPorts() []models.InputPort

func (*Node) OutputPorts

func (n *Node) OutputPorts() []models.OutputPort

func (*Node) Type

func (n *Node) Type() string

func (*Node) Validate

func (n *Node) Validate(config map[string]any) error

type Types

type Types map[string]models.RemoteNodeType

Types holds node types in memory by id.

func ReadTypes

func ReadTypes(path string) (Types, error)

ReadTypes reads a JSON object of node types keyed by id, each with the body of PUT /platform/node-types/:id, and prepares every one.

func (Types) Get

Get returns the node type with the given id.

Jump to

Keyboard shortcuts

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