lexmag / fluxter

High-performance and reliable InfluxDB writer for Elixir

Home Page:https://hexdocs.pm/fluxter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamic host/port config

pikeas opened this issue · comments

Currently, start_link/0 calls Fluxster.config_for/1. This seems to prevent runtime configuration of parameters.

Here are a few ways to improve this:

  • Add @defoverridable start_link: 0
  • Make Fluxster.config_for the default value for a new config_fun variable.
  • Have config_for read from System.get_env before Application.get_all_env.
  • Move config_for into __using__ and make it overridable, and call it on the module rather than on Fluxter.

I've submitted a pull request to implement such functionality.
#19
Enjoy!