{"modulePath":"github.com/cloudzero/cloudzero-agent","version":"v1.1.0-rc-1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parallel\n\nPackage parallel provides utilities for running tasks in parallel.\n\n## Types\n\n```go\ntype Manager struct {\n\t// contains filtered or unexported fields\n}\n```\nManager is a structure for running tasks in parallel.\n\n```go\nfunc New(workercount int) *Manager\n```\nNew creates a new parallel.Manager.\n\n```go\nfunc (p *Manager) Close()\n```\nClose waits all tasks to finish.\n\n```go\nfunc (p *Manager) Run(fn Task, waiter *Waiter)\n```\nRun runs the given task while limiting the concurrency.\n\n```go\ntype Task func() error\n```\nTask is a function type for parallel manager.\n\n```go\ntype Waiter struct {\n\t// contains filtered or unexported fields\n}\n```\nWaiter is a structure for waiting and reading error messages created by Manager.\n\n```go\nfunc NewWaiter() *Waiter\n```\nNewWaiter creates a new parallel.Waiter.\n\n```go\nfunc (w *Waiter) Err() \u003c-chan error\n```\nErr returns read-only error channel.\n\n```go\nfunc (w *Waiter) Wait()\n```\nWait blocks until the WaitGroup counter is zero and closes error channel.\n\n","path":"github.com/cloudzero/cloudzero-agent/app/parallel","name":"parallel","synopsis":"Package parallel provides utilities for running tasks in parallel.","isRedistributable":true}
