Documentation
¶
Index ¶
- type TaskRunner
- func (c *TaskRunner) RemoveWorker(taskType string, threadCount int) error
- func (c *TaskRunner) StartWorker(taskType string, executeFunction model.ExecuteTaskFunction, batchSize int, ...) error
- func (c *TaskRunner) StartWorkerWithDomain(taskType string, executeFunction model.ExecuteTaskFunction, threadCount int, ...) error
- func (c *TaskRunner) WaitWorkers()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskRunner ¶
type TaskRunner struct {
// contains filtered or unexported fields
}
TaskRunner Runner for the Task Workers. Task Runners implements the polling and execution logic for the workers
func NewTaskRunner ¶
func NewTaskRunner(authenticationSettings *settings.AuthenticationSettings, httpSettings *settings.HttpSettings) *TaskRunner
func NewTaskRunnerWithApiClient ¶
func NewTaskRunnerWithApiClient( apiClient *client.APIClient, ) *TaskRunner
func (*TaskRunner) RemoveWorker ¶
func (c *TaskRunner) RemoveWorker(taskType string, threadCount int) error
func (*TaskRunner) StartWorker ¶
func (c *TaskRunner) StartWorker(taskType string, executeFunction model.ExecuteTaskFunction, batchSize int, pollInterval time.Duration) error
StartWorker
- taskType Task Type to poll and execute the work
- executeFunction Task execution function
- batchSize Amount of tasks to be polled. Each polled task will be executed and updated within its own unique goroutine.
- pollInterval Time to wait for between polls if there are no tasks available. Reduces excessive polling on the server when there is no work
func (*TaskRunner) StartWorkerWithDomain ¶
func (c *TaskRunner) StartWorkerWithDomain(taskType string, executeFunction model.ExecuteTaskFunction, threadCount int, pollInterval time.Duration, domain string) error
StartWorkerWithDomain
- taskType Task Type to poll and execute the work
- executeFunction Task execution function
- batchSize Amount of tasks to be polled. Each polled task will be executed and updated within its own unique goroutine.
- pollInterval Time to wait for between polls if there are no tasks available. Reduces excessive polling on the server when there is no work
- domain Task domain. Optional for polling
func (*TaskRunner) WaitWorkers ¶
func (c *TaskRunner) WaitWorkers()
Click to show internal directories.
Click to hide internal directories.