Documentation
¶
Index ¶
Constants ¶
View Source
const ( // STARTED is a value used for control which are running STARTED = "Started" // FINISHED is a value used for control which are finished FINISHED = "Finished" // ERROR is a value used for control if has error ERROR = "Error" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SubWorker ¶
SubWorker is a type that represents the concurrency, for the number of concurrency has an #SubWorker
type Worker ¶
type Worker struct { ID string Name string StartAt time.Time FinishedAt time.Time Handle func() error Concurrency int RestartAlways bool Restarts int // contains filtered or unexported fields }
Worker is a type that represents an group of concurrency and keep some settings
func (*Worker) IsUp ¶
IsUp check if anyone #SubWorker still #STARTED, this survey responds if it is running
func (*Worker) Run ¶
func (w *Worker) Run(errors chan WrapperHandleError)
Run is a executed inside goroutine by #RunWorkers He administrate the number of concurrency
type WrapperHandleError ¶
type WrapperHandleError struct {
// contains filtered or unexported fields
}
WrapperHandleError is a wrapper to transport worker and the error generate inside worker
Click to show internal directories.
Click to hide internal directories.