-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improved API #19
Improved API #19
Conversation
@Cerfoglg does not build |
@VincenzoFerme Fixed the deps (I hate golang so much), and added comments |
) | ||
|
||
type Response struct { |
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.
Send also the actual result of the query back
You miss the |
@@ -39,19 +40,30 @@ func queryHandler(w http.ResponseWriter, r *http.Request) { | |||
} | |||
if name == value { |
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.
What about the false alternative to the response?
@Cerfoglg I reviewed the pull request. See all the comments |
@@ -48,14 +48,22 @@ func queryHandler(w http.ResponseWriter, r *http.Request) { | |||
//fmt.Fprintf(w, "Row "+strconv.Itoa(rowI)+" matches "+value+" \n") | |||
response = Response{true} | |||
} | |||
if(method == "nequal") { |
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.
else if
@Cerfoglg you don' actually need to add the |
@VincenzoFerme There doesn't seem to be any codeclimate file on the upstream repo |
@Cerfoglg this is not done #19 (comment). It also impacts the description here: #16 (comment) |
) | ||
|
||
// Struct for the Json respone for this monitor | ||
type Response struct { |
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.
@VincenzoFerme This should all be okay now |
@@ -35,35 +36,40 @@ func queryHandler(w http.ResponseWriter, r *http.Request) { | |||
} | |||
// Checks over the rows if the comparison holds | |||
rowI := 0 |
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 do you need this variable?
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.
@VincenzoFerme turns out I don't, I had it in case I needed the row index. Removed it.
@Cerfoglg reviewed again. You can see the remaining task in the list in the first comment. |
@VincenzoFerme ready now |
Works on #16, works on #13, fixes #8
![](https://camo.githubusercontent.com/f79211df976f17f689afcdad9cf11b6090266511c4c76958d1c3b5c7370ce90d/687474703a2f2f7777772e636f64657265766965776875622e636f6d2f736974652f6769746875622d6261722e706e67)
.codeclimate
file in the https://github.com/Cerfoglg/monitors/tree/env-variables branch related to this pull request.The same applies for Define the deployment descriptors and update ENV variables names #13
remaining
in the top comment of the issue.codeclimate
file, just synch with the upstream repo because it is already there.ID
, then you can exit the loop once you find the container passed asquery
cpu
and themysql
monitors?Vincenzo Ferme
Skype: vincenzoferme
Web: http://www.vincenzoferme.it
Email: info@vincenzoferme.it
On May 31, 2016 10:05 AM, "Gabriele Cerfoglio" notifications@github.com
wrote:
json.Marshal
it.each
is not equal toName
. Set the actual value in a variable as you do for theID
, and then set it here.else if
else if