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

AWS Support #273

Open
matrinox opened this issue Sep 13, 2017 · 4 comments
Open

AWS Support #273

matrinox opened this issue Sep 13, 2017 · 4 comments

Comments

@matrinox
Copy link
Contributor

I've read the 2 issues on AWS: #249 & #254. I need to get AWS Elasticsearch support for my elixir servers. I think it makes the most sense to spend my time adding AWS support to this library than adding elasticsearch support to one of the AWS elixir libraries. In issue #254, @Zatvobor didn't say much in response to questions about guidelines and if the PR would be accepted. I'd take that hasn't changed?

@OpakAlex
Copy link
Collaborator

@matrinox hi man! Thanks for your interest. The main point you need add tests to all your functions. This is our guideline ;)

@matrinox
Copy link
Contributor Author

@OpakAlex That's a must :)

@matrinox
Copy link
Contributor Author

I think I found a solution and I just want some thoughts on it before I go down the path.

I've identified Tirexs.HTTP as the module to extend. In issue #249, the @Zatvobor expressed issue with adding AWS-specific code to Tirexs.HTTP. I agree with that but since Tirexs.HTTP is used in 7 places, it limits some of the other options. I think the cleanest way of doing this would be to create another module – let's call it Tirexs.AWS.HTTP – and maybe share like code through a third module. Perhaps we can allow the user to configure the "HTTP" module to use. For example:

config :tirexs,
  # http_name: Tirexs.HTTP, # default,
  http_name: Tirexs.AWS.HTTP, # when using aws
  aws: [
    access_key_id: "..." #
    secret_key: "..." #
    region: "..." #
  ]

What are your thoughts?

The other idea I had was to use a middleware pattern but I feel that requires more work for a very specific use-case. But I am open to ideas.s

@OpakAlex
Copy link
Collaborator

Hi man, i like idea for configure HTTP module. It's looks good for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants