executor

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskExecutor

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

TaskExecutor implements the interfaces.TaskExecutor interface

func NewTaskExecutor

func NewTaskExecutor() *TaskExecutor

NewTaskExecutor creates a new task executor

func (*TaskExecutor) ExecuteAsync

func (e *TaskExecutor) ExecuteAsync(ctx context.Context, taskName string, params interface{}, opts *interfaces.TaskOptions) (<-chan *interfaces.TaskResult, error)

ExecuteAsync executes a task asynchronously

func (*TaskExecutor) ExecuteStep

func (e *TaskExecutor) ExecuteStep(ctx context.Context, t *core.Task, step *core.Step) error

ExecuteStep executes a single step in a task plan

func (*TaskExecutor) ExecuteSync

func (e *TaskExecutor) ExecuteSync(ctx context.Context, taskName string, params interface{}, opts *interfaces.TaskOptions) (*interfaces.TaskResult, error)

ExecuteSync executes a task synchronously

func (*TaskExecutor) ExecuteTask

func (e *TaskExecutor) ExecuteTask(ctx context.Context, t *core.Task) error

ExecuteTask executes all steps in a task's plan

func (*TaskExecutor) RegisterTask

func (e *TaskExecutor) RegisterTask(name string, taskFunc TaskFunc)

RegisterTask registers a task function with the executor

type TaskFunc

type TaskFunc func(ctx context.Context, params interface{}) (interface{}, error)

TaskFunc is a function that executes a task

type TaskOptions

type TaskOptions struct {
	Timeout      *time.Duration
	MaxRetries   *int
	RetryBackoff *time.Duration
	Metadata     map[string]interface{}
}

TaskOptions contains options for task execution

Jump to

Keyboard shortcuts

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