Skip to content
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

Changed rest handler interface to take NodeClient #19170

Merged
merged 2 commits into from Jun 30, 2016

Conversation

Projects
None yet
4 participants
@rjernst
Copy link
Member

commented Jun 30, 2016

Previously all rest handlers would take Client in their injected ctor.
However, it was only to hold the client around for runtime. Instead,
this can be done just once in the HttpService which handles rest
requests, and passed along through the handleRequest method. It also
should always be a NodeClient, and other types of Clients (eg a
TransportClient) would not work anyways (and some handlers can be
simplified in follow ups like reindex by taking NodeClient).

Internal: Changed rest handler interface to take NodeClient
Previously all rest handlers would take Client in their injected ctor.
However, it was only to hold the client around for runtime. Instead,
this can be done just once in the HttpService which handles rest
requests, and passed along through the handleRequest method. It also
should always be a NodeClient, and other types of Clients (eg a
TransportClient) would not work anyways (and some handlers can be
simplified in follow ups like reindex by taking NodeClient).
@s1monw

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2016

LGTM!!! thanks

@nik9000

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2016

LGTM too.

@rjernst rjernst merged commit 8275ab4 into elastic:master Jun 30, 2016

@rjernst rjernst deleted the rjernst:rest_handler_client branch Jun 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.