submitin

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: 14 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 submitin contains the submitIn node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SubmitConfig

type SubmitConfig struct {
	// Path is the URL path the upload endpoint listens on
	// (default "/submit"; ":name" segments become route params).
	Path string `json:"path"`
	// Port for the upload listener (default 8081 — must differ from
	// the admin port, same model as httpTrigger).
	Port int `json:"port"`
	// Listener selects where the route is served: "own" (default)
	// binds a private TCP listener on Port; "main" mounts the route
	// on the host's shared HTTP server via host.SharedHTTPRouter(), behind
	// the admin middleware — same model as httpTrigger.
	Listener string `json:"listener"`
	// MaxSize caps the upload in bytes (0 = defaultMaxSubmitBytes).
	MaxSize int64 `json:"maxSize"`
	// Auth is "none" (default) or "admin" (require credentials from
	// the admin auth file; the username lands in submittedBy).
	Auth string `json:"auth"`
}

SubmitConfig holds the node.Data fields of a submitIn node.

type SubmitNode

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

SubmitNode is a node that receives uploaded files over HTTP and injects them into the running workflow with submit metadata.

func NewSubmitNode

func NewSubmitNode(node nodestore.NodeInterface, config *SubmitConfig, host nodebase.NodeHost) *SubmitNode

NewSubmitNode creates a new submitIn node executor.

func (*SubmitNode) Execute

Execute binds the upload listener and returns immediately; each accepted upload is injected downstream as it arrives.

func (*SubmitNode) Stop

func (n *SubmitNode) Stop() error

Stop shuts down the upload listener (idempotent).

func (*SubmitNode) Validate

func (n *SubmitNode) Validate() error

Validate checks the node configuration (and normalizes defaults).

Jump to

Keyboard shortcuts

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