-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Refactor/remove dispatch #3658
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
Merged
Merged
Refactor/remove dispatch #3658
Conversation
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
…ts equivalent low level method
…st attempt at cached builders
…rder to determine the right HttpMethod Made this explicit through ResolvedRouteValues but not too keen to keep this around. ConnectionSettings small refactor, now exposes Id to uniquely identify the instance
Closed
russcam
approved these changes
Apr 12, 2019
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.
LGTM 👍
# Conflicts: # src/Nest/CommonAbstractions/ConnectionSettings/ConnectionSettingsBase.cs # src/Nest/_Generated/_Descriptors.generated.cs # src/Nest/_Generated/_LowLevelDispatch.generated.cs # src/Nest/_Generated/_Requests.generated.cs
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.
Note: can not be merged while we want to release an
alpha
for 7,xBefore this PR how the highlevel client performed a call was roughly
The benefit here is that the high level client uses the actual low level client overloads which in turn are responsible for building the url paths. This is all tested through our extensive integration tests.
This PR cuts out the middle layer:
This means that in the high level client
IRequest
now does it own url building. Check outApiUrls
LookupUrl
in this PR for the first attempt this PR introduces to do this somewhat efficiently.The upside is that the call chain is much much lower and we calling the client API methods allocate a whole lot less lambda closures.
Downside is that we have two url build mechanisms one in the high level client which is heavily tested but leaves the lowlevel client somehwat exposes. Good thing we will be reintroducing the YAML tests for the low level client again 😄
The hand off from
RouteValues
toLookupUrl
is less clean than I had liked.IndexRequest
needs a resolved id to determine whether to do a PUT or POST. This warrants more investigation but would like to do so as part of a new branch as this one is rather large already.