Documentation ¶
Index ¶
Constants ¶
View Source
const ( WORKER_STARTED = "dash_started" WORKER_COMPLETED = "dash_complete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct { Cancel context.CancelFunc // contains filtered or unexported fields }
func CreateManager ¶
func CreateManager() Manager
type Sweep ¶
type Sweep[C any, R any] struct { Generator func(config chan C, manager Manager) Worker func(config C, results chan R, events chan Event, manager Manager) OnEvent func(event WorkerEvent[C]) GetWorkerName func(config C) string MaxWorkers int }
func (Sweep[C, R]) Run ¶
func (s Sweep[C, R]) Run() []WorkerResult[C, R]
* Complete all generated work units in parallel. *
type WorkerDescription ¶
type WorkerEvent ¶
type WorkerEvent[C any] struct { Description WorkerDescription[C] Event Event Time time.Time }
type WorkerResult ¶
type WorkerResult[C any, R any] struct { Description WorkerDescription[C] Result R Time time.Time }
Click to show internal directories.
Click to hide internal directories.