engine

package
v2.16.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: GPL-3.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAGRepositoryFactory added in v2.14.0

DAGRepositoryFactory creates repositories needed by execution-scoped loaders.

type DAGRepositoryFactoryOptions added in v2.14.0

type DAGRepositoryFactoryOptions struct {
	SearchPaths []string
}

DAGRepositoryFactoryOptions configures an execution-scoped DAG repository.

type DistributedOptions

type DistributedOptions struct {
	Coordinators    []string
	TLS             TLSOptions
	WorkerSelector  map[string]string
	PollInterval    time.Duration
	MaxStatusErrors int
}

type Engine

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

func New

func New(ctx context.Context, opts Options) (*Engine, error)

func (*Engine) Close

func (e *Engine) Close(ctx context.Context) error

func (*Engine) NewWorker

func (e *Engine) NewWorker(opts WorkerOptions) (*Worker, error)

func (*Engine) Outputs

func (e *Engine) Outputs(ctx context.Context, ref RunRef) (map[string]string, error)

func (*Engine) RunFile

func (e *Engine) RunFile(ctx context.Context, path string, opts RunOptions) (*Run, error)

func (*Engine) RunYAML

func (e *Engine) RunYAML(ctx context.Context, data []byte, opts RunOptions) (*Run, error)

func (*Engine) Status

func (e *Engine) Status(ctx context.Context, ref RunRef) (*Status, error)

func (*Engine) Stop

func (e *Engine) Stop(ctx context.Context, ref RunRef) error

type ExecutionMode

type ExecutionMode string
const (
	ExecutionModeLocal       ExecutionMode = "local"
	ExecutionModeDistributed ExecutionMode = "distributed"
)

type Options

type Options struct {
	HomeDir     string
	ConfigFile  string
	DAGsDir     string
	DataDir     string
	LogDir      string
	ArtifactDir string
	BaseConfig  string
	Logger      *slog.Logger

	Persistence        Persistence
	PersistenceFactory PersistenceFactory
	RunStateStore      runstate.Store
	DAGRunRepository   *persis.DAGRunRepository
	DefaultMode        ExecutionMode
	Distributed        *DistributedOptions
}

type Persistence

type Persistence struct {
	DAGRepository        *persis.DAGRepository
	DAGRunRepository     *persis.DAGRunRepository
	RunStateStore        runstate.Store
	ProcRepository       *persis.ProcRepository
	StateStore           dagrun.StateStore
	ServiceRegistry      serviceregistry.ServiceRegistry
	DAGRepositoryFactory DAGRepositoryFactory
	RuntimeStoresFactory RuntimeStoresFactory
}

Persistence contains the storage dependencies required by Engine.

type PersistenceFactory

type PersistenceFactory func(context.Context, *config.Config) (Persistence, error)

PersistenceFactory wires backend-specific stores after configuration is loaded.

type Run

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

func (*Run) ID

func (r *Run) ID() string

func (*Run) Name

func (r *Run) Name() string

func (*Run) Outputs

func (r *Run) Outputs(ctx context.Context) (map[string]string, error)

func (*Run) Ref

func (r *Run) Ref() RunRef

func (*Run) Status

func (r *Run) Status(ctx context.Context) (*Status, error)

func (*Run) Stop

func (r *Run) Stop(ctx context.Context) error

func (*Run) Wait

func (r *Run) Wait(ctx context.Context) (*Status, error)

type RunOptions

type RunOptions struct {
	RunID             string
	Name              string
	Params            map[string]string
	ParamsList        []string
	DefaultWorkingDir string
	Mode              ExecutionMode
	WorkerSelector    map[string]string
	Labels            []string
	DryRun            bool
	NoReuse           bool
}

type RunRef

type RunRef struct {
	Name string
	ID   string
}

type RuntimeStores

type RuntimeStores struct {
	SecretStore          secret.Store
	ProfileStore         profile.Store
	MaterializationStore build.MaterializationStore
}

RuntimeStores contains the stores used by workflow execution.

type RuntimeStoresFactory

type RuntimeStoresFactory func(context.Context, *config.Config) RuntimeStores

RuntimeStoresFactory creates stores for local workflow execution.

type Status

type Status struct {
	Name        string
	RunID       string
	AttemptID   string
	Status      string
	StartedAt   time.Time
	FinishedAt  time.Time
	Error       string
	LogFile     string
	ArchiveDir  string
	WorkerID    string
	TriggerType string
}

type TLSOptions

type TLSOptions struct {
	Insecure      bool
	CertFile      string
	KeyFile       string
	ClientCAFile  string
	SkipTLSVerify bool
}

type Worker

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

func (*Worker) Start

func (w *Worker) Start(ctx context.Context) error

func (*Worker) Stop

func (w *Worker) Stop(ctx context.Context) error

func (*Worker) WaitReady

func (w *Worker) WaitReady(ctx context.Context) error

type WorkerOptions

type WorkerOptions struct {
	ID            string
	MaxActiveRuns int
	Labels        map[string]string
	Coordinators  []string
	TLS           TLSOptions
	HealthPort    int
}

Jump to

Keyboard shortcuts

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