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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce start_link/1 callback to support runtime configuration #20
Conversation
lib/fluxter.ex
Outdated
{child_options, options} = | ||
Enum.split_with(options, fn {key, _value} -> | ||
key in [:id, :start, :restart, :shutdown, :type, :modules] | ||
end) |
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.
We can use Keyword.split/2
here :).
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.
Definitely!
test/fluxter_test.exs
Outdated
@@ -35,6 +35,10 @@ defmodule FluxterTest do | |||
use Fluxter | |||
end | |||
|
|||
defmodule FluxterXyzzy do |
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.
Why another module exactly like FluxterSample
here? 馃
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.
We need to start one more Fluxter pool with start_link/1
options, unfortunately, it can't be FluxterSample
because of name registration.
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.
Ah, I see. What about a more "conventional" name then, like OtherFluxterSample
?
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.
I used Xyzzy
since it is started with prefix: "xyzzy"
. About xyzzy itself: https://en.wikipedia.org/wiki/Xyzzy_(computing).
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.
I am 馃憥 on this name, I find it confusing and I don't think it fits well with FluxterSample
above.
What arguments do you pass to start_link in order to use the value of an environment variable as the influxdb hostname? |
The |
Closes #16.
Supersedes #19.
Not sure if we want support
:prefix
or not. 馃