-
Notifications
You must be signed in to change notification settings - Fork 110
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
Add TLS and basic authentication #101
Conversation
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.
Thanks for that! IMHO it would have been great to follow existing naming patterns in the toolkit interface, but I guess I missed it to comment on that in the repository itself and the ship has sailed now.
cmd/memcached_exporter/main.go
Outdated
@@ -82,7 +87,7 @@ func main() { | |||
}) | |||
|
|||
level.Info(logger).Log("msg", "Listening on address", "address", *listenAddress) | |||
if err := http.ListenAndServe(*listenAddress, nil); err != nil { | |||
if err := https.Listen(srv, *httpsConfig, logger); err != nil { |
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.
As the server is not necessarily serving HTTPS, I'd have chosen a more neutral package name to express this better, e.g. server
. Following the naming of the golang stdlib and calling the function ListenAndServe
would have also helped to make it easier for developers to understand what's going on.
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 willing to take a PR for renaming Listen to ListenAndServe and add a backwards compatible Listen function.
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.
Let's change this here @roidelapluie?
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 want you fully happy: prometheus/exporter-toolkit#29
b126105
to
05a48ef
Compare
Please approve again |
Signed-off-by: Julien Pivotto <[email protected]>
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.
👍 LGTM
Please feel totally free to ignore my nitpicking! This is great already.
To stay consistent with other exporters and because you have resolved the conversation, I have merged this. We could revisit later, if we feel this is an issue. |
Do we know when will be next stable release of prometheus/memcached_exporter which will include this TLS code? |
@sangeetg I can get that started. |
Thank you @SuperQ ... once you build a release, will it be tested to ensure it is stable or the tip is already tested and is stable? |
* [FEATURE] Add TLS and basic authentication #101 Signed-off-by: Ben Kochie <[email protected]>
Signed-off-by: Julien Pivotto [email protected]