{"modulePath":"github.com/cloudquery/plugin-sdk/v4","version":"v4.99.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package queue\n\n## Constants\n\n```go\nconst DefaultWorkerCount = 1000\n```\n\n## Types\n\n```go\ntype ConcurrentRandomQueue[T any] struct {\n\t// contains filtered or unexported fields\n}\n```\nConcurrentRandomQueue is a generic, thread-safe queue that pops random elements in O(1) time.\n\n```go\nfunc NewConcurrentRandomQueue[T any](seed int64, capacityHint int) *ConcurrentRandomQueue[T]\n```\n\n```go\nfunc (q *ConcurrentRandomQueue[T]) Pop() *T\n```\n\n```go\nfunc (q *ConcurrentRandomQueue[T]) Push(item T)\n```\n\n```go\ntype Option func(*Scheduler)\n```\n\n```go\nfunc WithCaser(c *caser.Caser) Option\n```\n\n```go\nfunc WithDeterministicCQID(deterministicCQID bool) Option\n```\n\n```go\nfunc WithErrorClassifier(classifier schema.ErrorClassifier) Option\n```\n\n```go\nfunc WithInvocationID(invocationID string) Option\n```\n\n```go\nfunc WithWorkerCount(workerCount int) Option\n```\n\n```go\ntype Scheduler struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewShuffleQueueScheduler(logger zerolog.Logger, m *metrics.Metrics, seed int64, opts ...Option) *Scheduler\n```\n\n```go\nfunc (d *Scheduler) Sync(ctx context.Context, tableClients []WorkUnit, resolvedResources chan\u003c- *schema.Resource, msgChan chan\u003c- message.SyncMessage)\n```\n\n```go\ntype WorkUnit struct {\n\tTable  *schema.Table\n\tClient schema.ClientMeta\n\tParent *schema.Resource\n}\n```\nWorkUnit is an atomic unit of work that the scheduler syncs.\n\nIt is one table resolver (same as all other scheduler strategies).\n\nBut if it is a non-top-level table, it is bound to a single parent resource.\n\n","path":"github.com/cloudquery/plugin-sdk/v4/scheduler/queue","name":"queue","synopsis":"","isRedistributable":true}
