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"`
}
WebSocketInConfig holds configuration for the websocketIn node.
type WebSocketInNode ¶
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 ¶
func (n *WebSocketInNode) Execute(ctx context.Context, input nodestore.MessageInterface) (nodestore.MessageInterface, error)
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