-
Notifications
You must be signed in to change notification settings - Fork 399
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
Enable to use aws es with iam auth #98
base: master
Are you sure you want to change the base?
Enable to use aws es with iam auth #98
Conversation
I could really use this. Any chance that it will be included in the project? |
This would be very useful, any updated on this? |
thanx @bathan , @pulkitjalan , and sorry for my late reply... but if this code helps you, i'm happy :) |
This will get included when the composer.json file is updated correctly, and when the test suite successfully runs so the project does not break for people already using the project. ---- On Tue, 27 Sep 2016 23:00:12 +1000 [email protected] wrote ---- I could really use this. Any chance that it will be included in the project? — |
@timgws Thanx for your comment! :) |
97090db
to
7709f6b
Compare
also rebased for cleaning up code. ;) |
@bathan @pulkitjalan |
@yukato Awesome, thanks! |
Hi @yukato!
Thanks for your work here. This is really starting to look good. The only thing now is that The way that I suggest doing this is maybe making a new class ( The factory's purpose is that it will build either an instance of the ElasticSearch PHP API using either |
@timgws Thanks for your comment :) |
@timgws Do i misunderstand your suggestion? feel free to comment to me, i'll do my best ;) |
@yukato, re: factory, I was thinking something along the lines of this: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/SimpleFactory The factory class would contain a method that would detect wether the config was for Amazon or not, if it was for Amazon, a class would be created that would create an Elastic instance for use with the Amazon SDK. Another method would create an instance without using the Amazon SDK. This way, for users that are not using Amazon, they do not need to install the Amazon SDK. Currently, if I wanted to remove the Amazon dependancy from my app using your PR, then I would end up with a broken application that did not work. |
5e58de2
to
63f8e6d
Compare
63f8e6d
to
96e65e7
Compare
Hi @timgws , thank you for your reply ;) And yes, my Can you please check again? :) |
@timgws if i need to improve code more, feel free to tell me. :) |
@yukato, your work on 7a7ecf8 is almost half way to being awesome! (: If you have a look at the Design Pattern code again that I linked you before (https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/SimpleFactory) look at the class SimpleFactory. What would happen is you would have two new classes under eg,
This way, when you call |
I wanted to use Amazon Elasticsearch Service. (Amazon ES)
https://aws.amazon.com/elasticsearch-service/
When use Amazon ES, I also want to use IAM auth, and with elasticsearch-php library, I wanted to set aws authed handler.
https://github.com/elastic/elasticsearch-php