package
Version:
v0.0.0-...-386a0b5
Opens a new window with list of versions in this module.
Published: Mar 14, 2022
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Job struct {
Done chan bool
Progress chan int
Errors chan error
}
Job is a generic job with its own state
Get finds and returns a job by its id or nil if not found
func New(params interface{}) *Job
New creates a new job
GetErrors returns errors of this job
func (j *Job) GetProgress() int
GetProgress returns progress of this job
ID returns ID of this job
func (j *Job) Params() interface{}
Params returns params of this job
func (j *Job) Start(worker func(*Job))
Start starts this job by running the given worker func
Source Files
¶
Click to show internal directories.
Click to hide internal directories.