executor

package
v2.0.55 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 16 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

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
	// HTTPClient is the client used for outbound RunService calls.
	HTTPClient connect.HTTPClient
	// QPS is the token-bucket rate for CreateRun calls (tokens/second).
	QPS float64
	// Burst is the token-bucket burst size.
	Burst int
	// ClientOpts are connect client options for the outbound RunService client.
	ClientOpts []connect.ClientOption
}

TriggerExecutorConfig holds tunables for the executor.

Jump to

Keyboard shortcuts

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