tcpin

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 11 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 tcpin contains the tcpIn node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPInConfig

type TCPInConfig struct {
	// Mode selects "listen" (accept connections on port) or
	// "connect" (dial out to host:port).
	Mode string `json:"mode"`
	// Host is the remote host for connect mode (default 127.0.0.1).
	Host string `json:"host"`
	// Port is the listen port (listen mode) or remote port (connect).
	Port int `json:"port"`
	// TLS names a tlsConfig node in the same workflow; in connect
	// mode the dialed connection is upgraded to TLS with that material.
	TLS string `json:"tls"`
}

TCPInConfig holds configuration for the tcpIn node.

type TCPInNode

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

TCPInNode receives raw TCP data — either by listening for inbound connections or by connecting to a remote host. Each received line (bufio scanner) is emitted downstream as Data with the remote ip/port in Metadata. Accepted connections are registered in the workflow's shared tcpSessions map for tcpOut reply mode.

func NewTCPInNode

func NewTCPInNode(node nodestore.NodeInterface, config *TCPInConfig, host nodebase.NodeHost) *TCPInNode

NewTCPInNode creates a new tcpIn node

func (*TCPInNode) Execute

Execute activates the node: listen mode binds a socket and spawns an accept loop; connect mode dials and starts one reader goroutine.

func (*TCPInNode) Stop

func (n *TCPInNode) Stop() error

Stop shuts down the listener / outbound connection and every accepted session registered by this workflow's tcpIn nodebase.

func (*TCPInNode) Validate

func (n *TCPInNode) Validate() error

Validate checks the tcpIn node configuration

Jump to

Keyboard shortcuts

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