fsin

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

FS In node

Type: fsIn
Category: Storage

Polls a local/sftp/ftp directory locator and emits one message per new file.

Behavior

This node is registered as fsIn and runs as part of a workflow. Its exact runtime behavior is implemented in node.go; this document summarizes the editor-facing purpose and configuration contract.

Configuration

Field Type Default Description
acceptAnyHostKey boolean false Accept Any Host Key — sftp locators: skip host-key verification (INSECURE — vulnerable to MITM; prefer pinning hostKey)
delete boolean false Delete After Emit — Remove each file after it is emitted (Switch receive-and-consume)
format string utf8 Format — utf8: payload = file contents as string; binary: payload = []byte; path: payload = the locator path only (pairs with a downstream reader)
hostKey string Host Key — sftp locators: expected host public key (authorized_keys or base64); required unless acceptAnyHostKey is set
interval number 5 Poll Interval (s) — Seconds between directory polls
keyFile string SSH Key File — sftp locators: local path to an SSH private key
location string Location — Directory locator to poll: a local path, sftp://user@host/path or ftp://user@host/path. Remote polling only — no fsnotify
password string Password — Remote locator password, or the keyFile passphrase (credential: masked, never exported)
pattern string Pattern — Optional glob filter on file base names (e.g. "*.xml"); empty accepts every file

Implementation

  • node.go contains the executor, validation, schema, and registration.
  • editor.html contains the editor integration.
  • node_test.go, when present, contains behavioral tests.

Documentation

Overview

Package fsin contains the fsIn node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FsInConfig

type FsInConfig struct {
	// Location is the directory to poll: a local path or an
	// sftp://user@host/path or ftp://… locator.
	Location string `json:"location"`
	// Interval is the poll period in seconds (default 5).
	Interval float64 `json:"interval"`
	// Format selects the emitted payload: "utf8" (default, file
	// contents as string) | "binary" ([]byte) | "path" (locator path
	// only — pairs with a downstream reader).
	Format string `json:"format"`
	// Delete removes each file after it is emitted (Switch's
	// "leave file" toggle, inverted: receive-and-consume).
	Delete bool `json:"delete"`
	// Pattern, when set, is a glob matched against file base names
	// (e.g. "*.xml"); empty accepts every file.
	Pattern string `json:"pattern"`
	// Credentials for remote locators (see FsCredentials). Password
	// is credential-typed.
	Password         string `json:"password"`
	KeyFile          string `json:"keyFile"`
	HostKey          string `json:"hostKey"`
	AcceptAnyHostKey bool   `json:"acceptAnyHostKey"`
}

FsInConfig holds the fsIn node configuration.

type FsInNode

type FsInNode struct {
	*nodebase.BaseNode
	// contains filtered or unexported fields
}

FsInNode polls a directory locator and emits one message per new file (Stopper lifecycle like watch/inject).

func NewFsInNode

func NewFsInNode(node nodestore.NodeInterface, config *FsInConfig, host nodebase.NodeHost) *FsInNode

NewFsInNode creates a new fsIn node.

func (*FsInNode) Execute

Execute opens the locator and starts the polling goroutine. The returned payload is a status message (like watch); file messages flow through host.emit as polls find them.

func (*FsInNode) Stop

func (n *FsInNode) Stop() error

Stop shuts the poller and the remote connection down.

func (*FsInNode) Validate

func (n *FsInNode) Validate() error

Validate checks the fsIn configuration.

Jump to

Keyboard shortcuts

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