[Phase 2] Define Queue and QueueManager interfaces/traits (API Contract) #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements Phase 2 of the links-queue project: defining the Queue and QueueManager interfaces/traits (API Contract).
js/src/queue/types.tswith full JSDoc documentationrust/src/queue/traits.rswith comprehensive doc commentsImplementation Details
TypeScript (js/src/queue/)
Queueinterface:enqueue,dequeue,peek,acknowledge,reject,getStats,getDepthQueueManagerinterface:createQueue,deleteQueue,getQueue,listQueuesEnqueueResult: returned when an item is enqueued (id + position)QueueStats: depth, enqueued, dequeued, acknowledged, rejected, inFlight countsQueueOptions: maxSize, visibilityTimeout, retryLimit, deadLetterQueue, priorityQueueInfo: queue metadata for listingQueueError: error class with typed error codesQueueHandlerandQueueSubscription: for future consumer patternsRust (rust/src/queue/)
Queue<T>trait: async queue operations with generic link typeQueueManager<T, Q>trait: async queue lifecycle managementEnqueueResult<T>,QueueStats,QueueOptions,QueueInfostructsQueueErrorwithQueueErrorCodeenum andDisplayimplementationsQueueOptionswith sensible defaultsTests
135 JavaScript tests covering:
47+ Rust integration tests including:
Test plan
npm test- 135 tests)cargo test- 93 unit + 47 integration + 23 doc tests)npm run lint)Fixes #10
🤖 Generated with Claude Code