-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nextgen: Tristanable v2 #4
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Fixed typos in `README.md` - Added new logo (source included)
- Added public imports along with comments per each Encoding - Added a stub class, `TaggedMessage`, for encoding and decoding the tristanable byte payload Exceptions - Added `TristanableException` exception type along with the `Error` enum sub-type Manager - Added stub code for `Manager` to manage the queues and socket Queue - Added stub class representing a queue with a tag (`Queue`) QueueItem - Added stub class `QueueItem` which represents an item that is enqueued/dequeued onto a `Queue` Watcher - Added stub class `Watcher` which will manage the socket reading-wise
- Ensured `Watcher`'s constructor is package-level accessible only Manager - The constructor now creates an instance of `Watcher` - Added a `start()` method which calls `watcher.start()`
- Added an import for `TaggedMessage` from module `tristanable.encoding`
- Added documentation for fields `tag` and `data` - Added documentation for both constructors - Added documentation for `getPayload()`, `getTag()`, `setPayload(byte[])` and `setTag(ulong)`
- Moved TODO below already completed code Exceptions - Renamed `Error` to `ErrorType` - Constructing a new `TristanableException` will now store the passed in `ErrorType` - Added `getError()` to `TristanableException` which returns the stored `ErrorType` - Added two new memebrs to enum `ErrorType`, namely `QUEUE_NOT_FOUND` and `QUEUE_ALREADY_EXISTS`
- Changed from using D's dynamic arrays for the array of `Queue` objects to using an `SList!(T)` where `T` is the `Queue` type - Implemented `getQueue(ulong)` which returns the `Queue` object with the matching id/tag, else throws an instance of `TristanabaleException` - Implemented `registerQueue(Queue)` which will attempt to add the provided `Queue` given that a queue does not already exist with the provided queue's id; if that is the case then an instance of `TristanableException` is thrown Queue - Made the constructor take in the `ulong` queue ID - Made the constructor publically accessible - Implemented `getID()` which returns the `Queue`'s id as a `ulong` - Removed the static method `newQueue(ulong)` Unit test - Added a unit test to test `getQueue(ulong)` when the queue cannot be found - Added a unit test to test adding a queue and successfully retrieving it
- Fixed up the `exceptions` module import
- Added new member `NO_DEFAULT_QUEUE` to enum `ErrorType`
…lient` (unit tests seem to pass)
Bformat+River upgrade
- Added a TODO
Ability to de-register a queue
- Added enum members `DEQUEUE_FAILED` and `ENQUEUE_FAILED` to `ErrorType` enum
* Dub - Removed `libsnooze` dependency * Queue - Removed `libsnooze` imports * Queue - Added mutex+condition variable * Queue - Removed old `ensure()` call * Queue - Switched one thing over to mutex+condvar * Queue - Switched to using condition variable - Added configurable slumber interval
* Dub - Added `niknaks` package with a minimum version of `v0.3.0` * Encoding - Switched to niknaks for `decode()` * Encoding - `encode()` now uses niknaks
- Added testing for default queue
Honestly looks good to me, I will keep the issue open and work from there |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Please see https://deavmi.assigned.network/git/deavmi/tristanable/issues/3# for the todo list.