Documentation
¶
Index ¶
- type Config
- type Option
- func WithConfig(config Config) Option
- func WithExecutor(executor executor.Service) Option
- func WithMessageQueue(queue messaging.Queue[execution.Execution]) Option
- func WithProcessDAO(processDAO dao.Service[string, execution.Process]) Option
- func WithTaskExecutionDAO(taskExecutionDao dao.Service[string, execution.Execution]) Option
- func WithTaskExecutor(executor executor.Service) Option
- func WithWorkers(count int) Option
- type Service
- func (s *Service) GetProcess(ctx context.Context, processID string) (*execution.Process, error)
- func (s *Service) PauseProcess(ctx context.Context, processID string) error
- func (s *Service) ResumeProcess(ctx context.Context, processID string) error
- func (s *Service) Shutdown()
- func (s *Service) Start(ctx context.Context) error
- func (s *Service) StartProcess(ctx context.Context, workflow *model.Workflow, init map[string]interface{}, ...) (aProcess *execution.Process, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// WorkerCount is the number of workers processing tasks
WorkerCount int
// MaxTaskRetries is the maximum number of retries for a task
MaxTaskRetries int
// RetryDelay is the delay between task retry attempts
RetryDelay time.Duration
}
Config represents executor service configuration
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default executor configuration
type Option ¶
type Option func(*Service)
Package executor provides a service executor.
func WithConfig ¶
WithConfig sets the configuration for the service
func WithExecutor ¶
WithExecutor sets the task executor for the service
func WithMessageQueue ¶
WithMessageQueue sets the message queue implementation
func WithProcessDAO ¶
WithProcessDAO sets the process store implementation
func WithTaskExecutionDAO ¶
func WithTaskExecutor ¶
WithTaskExecutor sets a custom task executor function
func WithWorkers ¶
WithWorkers sets the number of worker goroutines
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles workflow execution
func (*Service) GetProcess ¶
GetProcess retrieves a process by ID
func (*Service) PauseProcess ¶
PauseProcess pauses a running process
func (*Service) ResumeProcess ¶
ResumeProcess resumes a paused process
Click to show internal directories.
Click to hide internal directories.