wait

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 10 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 wait contains the distributed wait node: it durably parks messages until a shared notify signal reaches its target count.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Signal         string      `json:"signal"`
	TargetCount    interface{} `json:"targetCount"`
	TimeoutSeconds interface{} `json:"timeoutSeconds"`
	MergeMode      string      `json:"mergeMode"`
	PollIntervalMS interface{} `json:"pollIntervalMs"`
}

Config holds the wait node configuration.

type Node

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

Node parks and releases distributed waiters.

func NewNode

func NewNode(node nodestore.NodeInterface, cfg *Config, host nodebase.NodeHost) *Node

NewNode creates a wait node.

func (*Node) Activate

func (n *Node) Activate(ctx context.Context) error

Activate starts the node's single lifecycle-managed poller. Parking never creates a goroutine per message; this cancellable poller is what makes restart-recovered and cross-runner waiters observable to the flow.

func (*Node) Execute

Execute evaluates the signal and target count, then persists the whole message as a waiter. It returns nil immediately: the message is parked in the coordination store, not held in this traversal goroutine.

func (*Node) Stop

func (n *Node) Stop() error

Stop cancels the poller. Parked rows deliberately remain in the durable store so a later deploy/restart can resume them.

func (*Node) StopKey

func (n *Node) StopKey() string

StopKey dedupes stopper registration for executor shells of one node.

func (*Node) Validate

func (n *Node) Validate() error

Validate fails deployment early when the host offers no durable coordination store. There is deliberately no in-memory fallback.

Jump to

Keyboard shortcuts

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