Documentation
¶
Overview ¶
Package allocator owns the execution queue and is the only service allowed to mutate `Process` instances according to the project guidelines. It is responsible for scheduling tasks and reporting their status back to the executor/processor layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// PollingInterval is how often the allocator checks for processes that need tasks
PollingInterval time.Duration
GroupTimeoutCheck time.Duration // how often to scan for timeouts
}
Config represents allocator service configuration
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default allocator configuration
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service allocates tasks to processes
func New ¶
func New(processDAO dao.Service[string, execution.Process], taskExecutionDao dao.Service[string, execution.Execution], queue messaging.Queue[execution.Execution], resultQ messaging.Queue[execution.Execution], store *correlation.Store, groupDAO correlation.DAO, config Config) *Service
New creates a new allocator service
Click to show internal directories.
Click to hide internal directories.