httptrigger

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: 13 Imported by: ? modules, 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 httptrigger contains the httpTrigger node implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPTrigger

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

HTTPTrigger is a node that triggers a workflow via HTTP. Each incoming request is injected into the running workflow as a payload; the request is answered by a downstream httpResponse node, or with a 504 error if the flow produces no response in time.

func NewHTTPTrigger

func NewHTTPTrigger(node nodestore.NodeInterface, config *HTTPTriggerConfig, host nodebase.NodeHost) *HTTPTrigger

NewHTTPTrigger creates a new HTTP trigger node

func (*HTTPTrigger) Execute

Execute starts the HTTP server to listen for incoming requests

func (*HTTPTrigger) Stop

func (n *HTTPTrigger) Stop() error

Stop shuts down the HTTP server

func (*HTTPTrigger) Validate

func (n *HTTPTrigger) Validate() error

Validate checks if the node is properly configured

type HTTPTriggerConfig

type HTTPTriggerConfig struct {
	Method string `json:"method"`
	Path   string `json:"path"`
	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() — the
	// Node-RED model (declare a path, serve on the admin port,
	// behind the admin middleware).
	Listener string `json:"listener"`
	// ResponseTimeout is how many seconds a request waits for a
	// downstream httpResponse before a 504 is returned
	// (0 = defaultResponseTimeout).
	ResponseTimeout float64 `json:"responseTimeout"`
}

HTTPTriggerConfig holds configuration for the HTTP trigger node

Jump to

Keyboard shortcuts

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