NewIndexedWorkQueue
Instantiates a new Indexed Work queue.
def NewIndexedWorkQueue(
name: string,
processor: Processor,
cfg: Config,
metricsScope: promutils.Scope
) - > IndexedWorkQueue, error
Instantiates a new Indexed Work queue.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The name of the work queue, used for identification and metrics. |
| processor | Processor | The Processor interface implementation that will handle the work items from the queue. |
| cfg | Config | The configuration settings for the work queue, including cache size, number of workers, and maximum retries. |
| metricsScope | promutils.Scope | The Prometheus metrics scope used for reporting metrics related to the work queue's operation. |
Returns
| Type | Description |
|---|---|
IndexedWorkQueue, error | A new IndexedWorkQueue instance or an error if the cache cannot be initialized. |