fsout

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 7 Imported by: 1 module, 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 fsout contains the fsOut node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FsOutConfig

type FsOutConfig struct {
	// Location is the target DIRECTORY locator: a local path or
	// sftp:// / ftp:// URI. The written file lives at
	// location/filename.
	Location string `json:"location"`
	// Filename is the base name to write (fixed mode); with
	// FilenameType "msg" the message's filename property is used —
	// a full msg filename is reduced to its base name so a remote
	// path cannot escape the locator dir.
	Filename     string `json:"filename"`
	FilenameType string `json:"filenameType"`
	// AppendNewline appends \n to every written payload.
	AppendNewline bool `json:"appendNewline"`
	// OverwriteFile: "true" (default) truncates, "false" appends,
	// "delete" removes the file first then writes fresh.
	OverwriteFile string `json:"overwriteFile"`
	// CreateDir creates missing locator directories (mkdir -p).
	CreateDir bool `json:"createDir"`
	// Encoding decodes a string payload before writing (same values
	// as the file node).
	Encoding string `json:"encoding"`
	// Credentials for remote locators; Password is credential-typed.
	Password         string `json:"password"`
	KeyFile          string `json:"keyFile"`
	HostKey          string `json:"hostKey"`
	AcceptAnyHostKey bool   `json:"acceptAnyHostKey"`
}

FsOutConfig holds the fsOut node configuration — the remote-capable sibling of FileConfig.

type FsOutNode

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

FsOutNode writes the payload to a file under a dir locator, then passes the message through with the resolved path in Metadata. The Fs is opened per message and closed after the write — remote delivery is a per-item dial (Switch's send model); volume flows should prefer the file node on a mount.

func NewFsOutNode

func NewFsOutNode(node nodestore.NodeInterface, config *FsOutConfig, host nodebase.NodeHost) *FsOutNode

NewFsOutNode creates a new fsOut node.

func (*FsOutNode) Execute

Execute resolves the target, writes via tmp+rename, and stamps the resolved locator path into Metadata["filename"].

func (*FsOutNode) Validate

func (n *FsOutNode) Validate() error

Validate checks the fsOut configuration.

Jump to

Keyboard shortcuts

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