Consolidate Channel and MultiChannel code and add new features. Fixes #238#239
Open
Consolidate Channel and MultiChannel code and add new features. Fixes #238#239
Conversation
77abc34 to
9ef96d9
Compare
d54c922 to
1e4cf66
Compare
#238 - merges MultiChannel into Channel interface, removing the separate multi.go implementation and priority.go - replaces UnderlayHandler god-interface with focused interfaces: Senders, MessageSourceProvider, UnderlayEventListener, and DialPolicy - replaces GroupedUnderlayFactory with DialPolicy interface; adds BackoffDialPolicy with exponential backoff, short-lived connection detection, MinDialInterval, and LastDialTime() - replaces UnderlayConstraints helper with Config.Constraints map and automatic constraint enforcement with CAS-guarded re-check - adds UnderlayEventListener callbacks with Channel parameter so consumers can track underlay state changes - adds Config.UnderlayEventListeners for consumer listener registration - adds Config.ConstraintStartupDelay for delayed constraint application - adds NewSingleChannelWithUnderlay for listener-side callers with bare underlays - adds MessageQueue, MakeSource1/2/3, and RetryToQueues helpers to reduce priority sender boilerplate - adds TypedBinding, TypedBindHandler, and TypedReceiveHandler generics for type-safe senders access during binding and message handling - consolidates binding code into bind.go; handler types into handler.go - adds comprehensive test suite (72+ tests across 10 files) - adds godoc comments to all exported symbols - clears waiters on channel close to release map entries eagerly - fixes nil dialPolicy panic in applyConstraints - fixes deferred re-check race in constraint enforcement
This file contains hidden or 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
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.
multi.go implementation and priority.go
Senders, MessageSourceProvider, UnderlayEventListener, and DialPolicy
adds BackoffDialPolicy with exponential backoff, short-lived
connection detection, MinDialInterval, and LastDialTime()
and automatic constraint enforcement with CAS-guarded re-check
consumers can track underlay state changes
bare underlays
reduce priority sender boilerplate
for type-safe senders access during binding and message handling