fsin

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 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.

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