runner

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConditionEvaluator added in v1.0.14

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

func NewConditionEvaluator added in v1.0.14

func NewConditionEvaluator() *ConditionEvaluator

func (*ConditionEvaluator) Evaluate added in v1.0.14

func (ce *ConditionEvaluator) Evaluate(condition string) (bool, error)

type DependencyRunner

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

func NewDependencyRunner

func NewDependencyRunner(runTask func(models.Task, ...string) error, log taskLogger) *DependencyRunner

func (*DependencyRunner) RunDependencies

func (dr *DependencyRunner) RunDependencies(task *models.Task, dependencies []models.Task) error

func (*DependencyRunner) RunDependenciesWithContext added in v1.0.14

func (dr *DependencyRunner) RunDependenciesWithContext(ctx context.Context, task *models.Task, dependencies []models.Task) error

func (*DependencyRunner) SetContextRunner added in v1.0.14

func (dr *DependencyRunner) SetContextRunner(runTaskWithCtx func(context.Context, models.Task, ...string) error)

type Executor

type Executor struct {
	DryRun bool
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(shell *Shell, log taskLogger, dryRun bool) *Executor

func (*Executor) ExecuteHook

func (e *Executor) ExecuteHook(hookName string, hook *models.Hook) error

func (*Executor) ExecuteTask

func (e *Executor) ExecuteTask(taskName string, task *models.Task, beforeHooks, afterHooks func([]string) error, updateCache func() error) error

func (*Executor) ExecuteTaskWithContext added in v1.0.14

func (e *Executor) ExecuteTaskWithContext(ctx context.Context, taskName string, task *models.Task, beforeHooks, afterHooks func([]string) error, updateCache func() error) error

type HookExecutor

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

func NewHookExecutor

func NewHookExecutor(hooks map[string]models.Hook, executor *Executor, log taskLogger) *HookExecutor

func (*HookExecutor) ExecuteHooks

func (he *HookExecutor) ExecuteHooks(hookNames []string) error

type PrefixedWriter added in v1.0.14

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

func NewPrefixedWriter added in v1.0.14

func NewPrefixedWriter(taskName string, isStdout bool) *PrefixedWriter

func (*PrefixedWriter) Close added in v1.0.14

func (w *PrefixedWriter) Close() error

func (*PrefixedWriter) Write added in v1.0.14

func (w *PrefixedWriter) Write(p []byte) (n int, err error)

type Runner

type Runner struct {
	Config *config.Config

	DryRun bool
	Force  bool
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(cfg *config.Config) *Runner

func (*Runner) Reset

func (r *Runner) Reset()

func (*Runner) RunTask

func (r *Runner) RunTask(task models.Task, extraArgs ...string) error

func (*Runner) RunTaskWithContext added in v1.0.14

func (r *Runner) RunTaskWithContext(ctx context.Context, task models.Task, extraArgs ...string) error

type Shell

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

func NewShell

func NewShell(globals map[string]string) *Shell

func (*Shell) GetShellCommand

func (s *Shell) GetShellCommand() (string, []string)

type TaskCache

type TaskCache struct {
	TaskName     string            `json:"task_name"`
	InputsHash   string            `json:"inputs_hash"`
	OutputsHash  string            `json:"outputs_hash"`
	LastRunTime  time.Time         `json:"last_run_time"`
	CommandHash  string            `json:"command_hash"`
	Dependencies []string          `json:"dependencies"`
	DepHashes    map[string]string `json:"dep_hashes"`
}

type Watcher

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

func NewWatcher

func NewWatcher(runner *Runner, task models.Task, patterns []string, extraArgs []string) *Watcher

func (*Watcher) Watch

func (w *Watcher) Watch() error

Jump to

Keyboard shortcuts

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