nwsconnection

package
v0.0.0-...-820be1f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 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

Index

Constants

View Source
const DialTimeout = 30 * time.Second

DialTimeout bounds the WebSocket handshake. The node runs without the runner's per-node timeout (see RunsInBackground), so it bounds its own start-up.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeWsConnection

type NodeWsConnection struct {
	FlowNodeID idwrap.IDWrap
	Name       string
	URL        string
	Headers    map[string]string
	HTTPClient *http.Client // shared client with cookie jar for upgrade handshake
}

NodeWsConnection is a listener entry node that connects to a WebSocket and dispatches HandleWsMessage chains for each incoming message.

func New

func New(id idwrap.IDWrap, name string, url string, headers map[string]string, httpClient *http.Client) *NodeWsConnection

func (*NodeWsConnection) GetID

func (n *NodeWsConnection) GetID() idwrap.IDWrap

func (*NodeWsConnection) GetName

func (n *NodeWsConnection) GetName() string

func (*NodeWsConnection) GetOutputVariables

func (n *NodeWsConnection) GetOutputVariables() []string

GetOutputVariables implements node.VariableIntrospector.

func (*NodeWsConnection) GetRequiredVariables

func (n *NodeWsConnection) GetRequiredVariables() []string

GetRequiredVariables implements node.VariableIntrospector.

func (*NodeWsConnection) IsEntryNode

func (n *NodeWsConnection) IsEntryNode() bool

IsEntryNode marks this as a valid flow entry point (no incoming edges).

func (*NodeWsConnection) IsLoopCoordinator

func (n *NodeWsConnection) IsLoopCoordinator() bool

IsLoopCoordinator prevents the runner from applying per-node timeout.

func (*NodeWsConnection) RunAsync

func (n *NodeWsConnection) RunAsync(ctx context.Context, req *node.FlowNodeRequest, resultChan chan node.FlowNodeResult)

func (*NodeWsConnection) RunSync

func (*NodeWsConnection) RunsInBackground

func (n *NodeWsConnection) RunsInBackground() bool

RunsInBackground keeps the connection open for the whole flow: it reads messages after the node returns, and later ws_send nodes write to it.

func (*NodeWsConnection) SetID

func (n *NodeWsConnection) SetID(id idwrap.IDWrap)

Jump to

Keyboard shortcuts

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