Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager keeps track of scheduled goroutines and provides mechanisms to wait for them to finish.
func New ¶
New creates a new instance of Manager with the provided generic type for the metadata argument.
func (*Manager) Run ¶
Run submits a task to the pool. If all workers are busy, Run will block until a worker is available.
func (*Manager) RunWithRetry ¶
RunWithRetry runs a task with a dedicated retrier. See [Run] for more details.
func (*Manager) Start ¶
func (m *Manager) Start()
Start starts the manager and runs all the registered tasks.
type ManagerStats ¶
type ManagerStats struct {
RunningTasks int `json:"running_tasks"`
}
ManagerStats contains statistics about the tasks operated by the manager.
type Option ¶
type Option func(m *Manager)
func WithCancelOnError ¶
func WithCancelOnError() Option
func WithExpotentialRetry ¶
func WithFirstError ¶
func WithFirstError() Option
func WithMaxTasks ¶
Click to show internal directories.
Click to hide internal directories.