loop

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChannelNameNext = "next"
	ChannelNameDone = "done"

	PayloadTypeNext = "loop.next"
	PayloadTypeDone = "loop.done"
)
View Source
const (
	DelayStrategyFixed       = "fixed"
	DelayStrategyExponential = "exponential"

	DelayMinIntervalSeconds = 1
	DelayMaxIntervalSeconds = 300
)
View Source
const (
	// DefaultTimeoutSeconds caps the total wall-clock time of a single loop run
	// when one is not configured. It exists so a loop can never get stuck
	// forever (e.g. downstream never reports back), which would also block every
	// subsequent run on the node since runs are serialized.
	DefaultTimeoutSeconds = 3600
	TimeoutMinSeconds     = 1
	TimeoutMaxSeconds     = 86400
)
View Source
const (
	StopReasonConditionMet  = "conditionTrue"
	StopReasonMaxIterations = "max_iterations"
)
View Source
const ComponentName = "loop"
View Source
const (
	MaxIterationsLimit = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DelaySpec

type DelaySpec struct {
	Enabled         bool   `json:"enabled" mapstructure:"enabled"`
	Strategy        string `json:"strategy" mapstructure:"strategy"`
	IntervalSeconds int    `json:"intervalSeconds" mapstructure:"intervalSeconds"`
}

type ExecutionMetadata

type ExecutionMetadata struct {
	Iteration                int       `json:"iteration"`
	MaxIterations            int       `json:"maxIterations"`
	Active                   bool      `json:"active"`
	StartedAt                time.Time `json:"startedAt"`
	WaitingBetweenIterations bool      `json:"waitingBetweenIterations,omitempty"`
}

type Loop

type Loop struct{}

func (*Loop) Cancel

func (c *Loop) Cancel(ctx core.ExecutionContext) error

func (*Loop) Cleanup

func (c *Loop) Cleanup(ctx core.SetupContext) error

func (*Loop) Color

func (c *Loop) Color() string

func (*Loop) Configuration

func (c *Loop) Configuration() []configuration.Field

func (*Loop) Description

func (c *Loop) Description() string

func (*Loop) Documentation

func (c *Loop) Documentation() string

func (*Loop) ExampleOutput

func (c *Loop) ExampleOutput() map[string]any

func (*Loop) Execute

func (c *Loop) Execute(ctx core.ExecutionContext) error

func (*Loop) HandleHook

func (c *Loop) HandleHook(ctx core.ActionHookContext) error

func (*Loop) HandleWebhook

func (c *Loop) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)

func (*Loop) Hooks

func (c *Loop) Hooks() []core.Hook

func (*Loop) Icon

func (c *Loop) Icon() string

func (*Loop) Label

func (c *Loop) Label() string

func (*Loop) Name

func (c *Loop) Name() string

func (*Loop) OutputChannels

func (c *Loop) OutputChannels(configuration any) []core.OutputChannel

func (*Loop) ProcessQueueItem

func (c *Loop) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*Loop) Setup

func (c *Loop) Setup(ctx core.SetupContext) error

type Spec

type Spec struct {
	UntilExpression        string     `json:"untilExpression"`
	MaxIterations          int        `json:"maxIterations"`
	TimeoutSeconds         int        `json:"timeoutSeconds" mapstructure:"timeoutSeconds"`
	DelayBetweenIterations *DelaySpec `json:"delayBetweenIterations,omitempty"`
}

Jump to

Keyboard shortcuts

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