-
Notifications
You must be signed in to change notification settings - Fork 33
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
Allow array of URIs when creating shovel #688
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments but nothing that must be fixed.
@@ -8,6 +8,13 @@ module LavinMQ | |||
|
|||
forward_missing_to @shovels | |||
|
|||
def parse_uris(src_uri) : Array(URI) | |||
uris = src_uri.as_s? ? [src_uri.as_s] : src_uri.as_a.map(&.as_s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably be
uris = src_uri.as_s? ? [src_uri.as_s] : src_uri.as_a.map(&.as_s) | |
uris = src_uri.as_s? || src_uri.as_a.map(&.as_s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not work for map,
undefined method 'map' for String (compile-time type is (Array(String) | String))
23f0527
to
486c9cc
Compare
* add destinationWrapper and allow multiple uris for creating shovel
WHAT is this pull request doing?
Allows for multiple URIs to be sent in when creating a shovel. This input can now be either a string, or an array of strings. If more than one uri string is provided, the shovel will randomly pick one URI from the list until one of the endpoints succeeds.
Needed for compatibility with clients
still needs some small adjustments
HOW can this pull request be tested?
Try to create a shovel and send in multiple uris