engine

package
v2.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAGStoreFactory

DAGStoreFactory creates DAG stores needed by execution-scoped loaders.

type DAGStoreFactoryOptions

type DAGStoreFactoryOptions struct {
	SearchPaths []string
}

DAGStoreFactoryOptions configures a backend-specific DAG definition store.

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
	DAGRunStore        coreexec.DAGRunStore
	DefaultMode        ExecutionMode
	Distributed        *DistributedOptions
}

type Persistence

type Persistence struct {
	DAGStore             exec.DAGStore
	DAGRunStore          exec.DAGRunStore
	RunStateStore        runstate.Store
	ProcStore            exec.ProcStore
	StateStore           dagstate.Store
	ServiceRegistry      exec.ServiceRegistry
	DAGStoreFactory      DAGStoreFactory
	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
}

type RunRef

type RunRef struct {
	Name string
	ID   string
}

type RuntimeStores

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

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