Documentation
¶
Overview ¶
Package delay contains the delay node implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelayConfig ¶
type DelayConfig struct {
Duration int `json:"duration"`
}
DelayConfig holds configuration for the delay node. Duration is in milliseconds; when unset a small default is used.
type DelayNode ¶
DelayNode pauses execution for the configured duration, honoring context cancellation so a stopped workflow exits promptly
func NewDelayNode ¶
func NewDelayNode(node nodestore.NodeInterface, config *DelayConfig) *DelayNode
NewDelayNode creates a new delay node
func (*DelayNode) Execute ¶
func (n *DelayNode) Execute(ctx context.Context, input nodestore.MessageInterface) (nodestore.MessageInterface, error)
Execute sleeps for the configured duration then passes the payload on