Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleProcess ¶
func HandleProcess(jobQueue *JobQueue) func(w http.ResponseWriter, r *http.Request)
func HandleStatus ¶
func HandleStatus(jobQueue *JobQueue) func(w http.ResponseWriter, r *http.Request)
Types ¶
type Job ¶
type Job struct { ID string `json:"id"` Status string `json:"status"` Result string `json:"result"` }
Job represents a unit of work.
type JobQueue ¶
type JobQueue struct {
// contains filtered or unexported fields
}
JobQueue represents a queue for jobs.
func NewJobQueue ¶
func NewJobQueue(redisClient *redis.Client) *JobQueue
NewJobQueue creates a new JobQueue.
type Worker ¶
type Worker struct { ID int // contains filtered or unexported fields }
Worker represents a worker that processes jobs.
func StartWorkerPool ¶
StartWorkerPool starts a pool of workers.
Click to show internal directories.
Click to hide internal directories.