Versions in this module Expand all Collapse all v1 v1.0.0 Feb 1, 2026 Changes in this version + var ErrQueueClosed = errors.New("queue is closed") + var ErrQueueEmpty = errors.New("queue is empty") + type FastQueue struct + func NewFastQueue(capacity int) *FastQueue + func (fq *FastQueue) Clear() error + func (fq *FastQueue) Close() error + func (fq *FastQueue) Contains(url string) bool + func (fq *FastQueue) IsEmpty() bool + func (fq *FastQueue) Len() int + func (fq *FastQueue) Pop() (*QueueItem, error) + func (fq *FastQueue) PopBatch(n int) ([]*QueueItem, error) + func (fq *FastQueue) PopWait() (*QueueItem, error) + func (fq *FastQueue) Push(item *QueueItem) error + func (fq *FastQueue) PushBatch(items []*QueueItem) (int, error) + func (fq *FastQueue) Stats() QueueStats + func (fq *FastQueue) URLs() []string + type MemoryQueue struct + func NewMemoryQueue(capacity int) *MemoryQueue + func (mq *MemoryQueue) Clear() error + func (mq *MemoryQueue) Close() error + func (mq *MemoryQueue) Contains(url string) bool + func (mq *MemoryQueue) IsEmpty() bool + func (mq *MemoryQueue) Len() int + func (mq *MemoryQueue) Peek() (*QueueItem, error) + func (mq *MemoryQueue) Pop() (*QueueItem, error) + func (mq *MemoryQueue) PopWait() (*QueueItem, error) + func (mq *MemoryQueue) Push(item *QueueItem) error + func (mq *MemoryQueue) URLs() []string + type PersistentQueue struct + func NewPersistentQueue(dbPath string, maxMemory int) (*PersistentQueue, error) + func (pq *PersistentQueue) Clear() error + func (pq *PersistentQueue) Close() error + func (pq *PersistentQueue) Contains(url string) bool + func (pq *PersistentQueue) IsEmpty() bool + func (pq *PersistentQueue) Len() int + func (pq *PersistentQueue) Peek() (*QueueItem, error) + func (pq *PersistentQueue) Pop() (*QueueItem, error) + func (pq *PersistentQueue) Push(item *QueueItem) error + func (pq *PersistentQueue) Stats() (queueSize, visitedCount int) + type Queue interface + Clear func() error + Close func() error + Contains func(url string) bool + IsEmpty func() bool + Len func() int + Peek func() (*QueueItem, error) + Pop func() (*QueueItem, error) + Push func(item *QueueItem) error + type QueueItem struct + Body []byte + Depth int + Headers map[string]string + Method string + ParentURL string + Priority int + Timestamp time.Time + URL string + type QueueStats struct + DedupEntries int + ShardSizes []int + TotalItems int