websocketin

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 12 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 websocketin contains the websocketIn node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebSocketInConfig

type WebSocketInConfig struct {
	// Path is the endpoint path that accepts upgrades (default "/ws").
	Path string `json:"path"`
	// Port is the node's own listen port (default 8082). Like
	// httpTrigger the node binds its own listener rather than sharing
	// the admin mux, which flowrunner has no reference to.
	Port int `json:"port"`
	// AllowedOrigins is a comma-separated list of Origin host
	// patterns passed to websocket.Accept. Empty keeps the legacy
	// any-origin behaviour (Node-RED parity, but a CSWSH exposure —
	// set it whenever browsers on foreign origins must not connect).
	AllowedOrigins string `json:"allowedOrigins"`
}

WebSocketInConfig holds configuration for the websocketIn node.

type WebSocketInNode

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

WebSocketInNode runs its own HTTP server that upgrades connections on the configured path and emits every received ws message downstream with the connection's session id in Metadata.

func NewWebSocketInNode

func NewWebSocketInNode(node nodestore.NodeInterface, config *WebSocketInConfig, host nodebase.NodeHost) *WebSocketInNode

NewWebSocketInNode creates a new websocketIn node

func (*WebSocketInNode) Execute

Execute binds the listener and starts the HTTP server. Binding is synchronous so a port conflict surfaces as a deploy error.

func (*WebSocketInNode) Stop

func (n *WebSocketInNode) Stop() error

Stop shuts down the HTTP server and closes every registered session.

func (*WebSocketInNode) Validate

func (n *WebSocketInNode) Validate() error

Validate checks the websocketIn node configuration

Jump to

Keyboard shortcuts

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