Documentation ¶
Index ¶
- Constants
- type Job
- type JobManager
- func (jm *JobManager) AddJob(jobType string, params map[string]string) string
- func (jm *JobManager) ExecuteJob(jobFunc func(params map[string]string), job *Job)
- func (jm *JobManager) GetJobs() map[string]*Job
- func (jm *JobManager) JobComplete(jobId string)
- func (jm *JobManager) StartJob(jobFunc func(params map[string]string), jobType string, ...) string
Constants ¶
View Source
const JobStatusDone = "Done"
View Source
const JobStatusStarted = "Started"
View Source
const JobTypeParser = "Parser"
View Source
const JobTypeScraper = "Scraper"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobManager ¶
type JobManager struct {
// contains filtered or unexported fields
}
Keeps track of running jobs in memory. No need to persist since jobs will only run in the single go process for now.
func GetJobManager ¶
func GetJobManager() *JobManager
func (*JobManager) AddJob ¶
func (jm *JobManager) AddJob(jobType string, params map[string]string) string
func (*JobManager) ExecuteJob ¶
func (jm *JobManager) ExecuteJob(jobFunc func(params map[string]string), job *Job)
func (*JobManager) GetJobs ¶
func (jm *JobManager) GetJobs() map[string]*Job
func (*JobManager) JobComplete ¶
func (jm *JobManager) JobComplete(jobId string)
Click to show internal directories.
Click to hide internal directories.