Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct {
Platform platforms.Platform
Owner string
Repository string
Config *config.RepoConfig
}
Job define information about the job to process
type Worker ¶
Worker process jobs from a queue
type WorkerPool ¶
type WorkerPool struct {
// Job queue
JobQueue chan *Job
// WorkerQueue is the job queue of a worker
WorkerQueue chan chan *Job
// Workers
Workers []*Worker
}
WorkerPool dispatch jobs to a pool of workers
func NewWorkerPool ¶
func NewWorkerPool(workerCount int, cancel chan struct{}) *WorkerPool
NewWorkerPool return a WorkerPool to process jobs
func (*WorkerPool) Start ¶
func (wp *WorkerPool) Start()
Start worker pool and dispatch job from JobQueue to the worker queue
Click to show internal directories.
Click to hide internal directories.