We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
MySQL and Redis supports static config, while NetHTTP and GRPC currently only Proc. e.g.
semian/lib/semian/mysql2.rb
Lines 137 to 140 in 1d4b53b
semian/lib/semian/net_http.rb
Lines 67 to 69 in 1d4b53b
semian/lib/semian/grpc.rb
Lines 48 to 50 in 1d4b53b
If pass a static config to NetHTTP and GRPC, semian is disabled because retrieve_semian_configuration returns nil.
retrieve_semian_configuration
nil
allow static config if it is not callable
def retrieve_semian_configuration(host, port) return @semian_configuration unless @semian_configuration.respond_to?(:call) @semian_configuration.call(host, port) end
Add validation to semian_configuration setter, assert whether static config or Proc is expected
semian_configuration
Lines 61 to 64 in 1d4b53b
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Background
MySQL and Redis supports static config, while NetHTTP and GRPC currently only Proc. e.g.
semian/lib/semian/mysql2.rb
Lines 137 to 140 in 1d4b53b
semian/lib/semian/net_http.rb
Lines 67 to 69 in 1d4b53b
semian/lib/semian/grpc.rb
Lines 48 to 50 in 1d4b53b
Problem
If pass a static config to NetHTTP and GRPC, semian is disabled because
retrieve_semian_configuration
returnsnil
.Proposal
allow static config if it is not callable
Alternative
Add validation to
semian_configuration
setter, assert whether static config or Proc is expectedsemian/lib/semian/net_http.rb
Lines 61 to 64 in 1d4b53b
The text was updated successfully, but these errors were encountered: