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 ¶
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 ¶
func (n *SubmitNode) Execute(ctx context.Context, input nodestore.MessageInterface) (nodestore.MessageInterface, error)
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).