executor

package
v2.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TriggerExecutor

type TriggerExecutor struct {
	// contains filtered or unexported fields
}

TriggerExecutor fires a CreateRun call for a scheduled trigger execution.

func NewTriggerExecutor

func NewTriggerExecutor(cfg TriggerExecutorConfig) *TriggerExecutor

NewTriggerExecutor constructs a TriggerExecutor.

func (*TriggerExecutor) Execute

func (e *TriggerExecutor) Execute(ctx context.Context, t *models.Trigger, scheduledAt time.Time) error

Execute fires a single CreateRun for the trigger at the given scheduled time. It uses a deterministic run name so that duplicate executions are idempotent.

type TriggerExecutorConfig

type TriggerExecutorConfig struct {
	// BaseURL is the URL of the runs service (e.g. "http://localhost:8090").
	BaseURL string
	// QPS is the token-bucket rate for CreateRun calls (tokens/second).
	QPS float64
	// Burst is the token-bucket burst size.
	Burst int
}

TriggerExecutorConfig holds tunables for the executor.

Jump to

Keyboard shortcuts

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