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

log

package
v0.2.1 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: 7 Imported by: 0

Documentation

Overview

Package log provides logging node factory for registry integration.

Package log provides logging node implementation for workflow graph execution.

Index

Constants

View Source
const (
	OutputPortSuccess = "success"
	OutputPortError   = "error"
	InputPortMain     = "main"
)

Variables

This section is empty.

Functions

func NewLogNodeFactory

func NewLogNodeFactory() protocol.NodeFactory

NewLogNodeFactory creates a new factory instance.

Types

type LogLevel

type LogLevel int

LogLevel represents different logging levels.

const (
	Debug LogLevel = iota
	Info
	Warn
	Error
)

type LogNode

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

LogNode implements the Node interface for logging messages.

func NewLogNode

func NewLogNode(id string, config map[string]any) (*LogNode, error)

NewLogNode creates a new logging node.

func (*LogNode) Execute

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

Execute performs the logging operation.

func (*LogNode) ID

func (n *LogNode) ID() string

ID returns the node ID.

func (*LogNode) InputPorts

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

InputPorts returns the input ports for the node.

func (*LogNode) OutputPorts

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

OutputPorts returns the output ports for the node.

func (*LogNode) Type

func (n *LogNode) Type() string

Type returns the node type.

func (*LogNode) Validate

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

Validate validates the node configuration.

type LogNodeFactory

type LogNodeFactory struct{}

LogNodeFactory creates LogNode instances.

func (*LogNodeFactory) Create

func (f *LogNodeFactory) Create(ctx context.Context, id string, config map[string]any) (protocol.Node, error)

Create creates a new LogNode instance.

func (*LogNodeFactory) Description

func (f *LogNodeFactory) Description() string

Description returns the factory description.

func (*LogNodeFactory) ID

func (f *LogNodeFactory) ID() string

ID returns the factory ID.

func (*LogNodeFactory) Name

func (f *LogNodeFactory) Name() string

Name returns the factory name.

func (*LogNodeFactory) Schema

func (f *LogNodeFactory) Schema() map[string]any

Schema returns the JSON schema for Log node configuration.

Jump to

Keyboard shortcuts

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