registry

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package registry provides node factory registration for the registry system.

Index

Constants

This section is empty.

Variables

View Source
var ErrNodeNotRegistered = errors.New("node type not registered")

ErrNodeNotRegistered is returned when a node type is not registered.

Functions

This section is empty.

Types

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) CreateNode

func (r *Registry) CreateNode(
	ctx context.Context,
	nodeType string,
	nodeID string,
	config map[string]any,
) (protocol.Node, error)

CreateNode creates a new node instance based on the provided node type and configuration.

func (*Registry) RegisterDefaultNodes

func (r *Registry) RegisterDefaultNodes()

RegisterDefaultNodes registers all built-in node factories with the registry.

func (*Registry) RegisterNode

func (r *Registry) RegisterNode(nodeFactory protocol.NodeFactory)

func (*Registry) UseCallbackURL

func (r *Registry) UseCallbackURL(base string)

UseCallbackURL sets the public base URL remote nodes call back to when they answer later.

func (*Registry) UseRemoteTypes

func (r *Registry) UseRemoteTypes(types RemoteTypes)

UseRemoteTypes makes CreateNode fall back to node types registered by the platform and served over HTTP.

type RemoteTypes

type RemoteTypes interface {
	Get(ctx context.Context, id string) (*models.RemoteNodeType, error)
}

Jump to

Keyboard shortcuts

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