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
list web scenarios as well as web items #4
Conversation
"time" | ||
) | ||
|
||
type HTTPTestStep 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.
can you please add doc to this structures? they have ambigious names (associated with some test purposes for me)
@@ -225,6 +225,18 @@ func (zabbix *Zabbix) GetItems(params Params) ([]Item, error) { | |||
return response.Data, nil | |||
} | |||
|
|||
func (zabbix *Zabbix) GetHTTPTests(params Params) ([]HTTPTest, error) { | |||
debugln("* retrieving web checks list") |
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.
web checks -> web scenarios, I guess
if err != nil { | ||
return hierr.Errorf( | ||
err, | ||
"can't obtain zabbix webchecks", |
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.
webchecks -> web scenarios
params := Params{ | ||
"hostids": identifiers, | ||
} | ||
|
||
var items []Item | ||
err = withSpinner( |
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.
can you please place this operations (items and web scenarios) into goroutines and run it in parallel mode?
errs <- err | ||
}() | ||
|
||
for _, err := range []error{<-errs, <-errs} { |
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 not just for err := range errs
?
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.
done
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 talking about the second part of range
, why there is such ambigious statement as []error{<-errs, <-errs}
, why not just range errs
?
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.
@kovetskiy: because range errs
will never end. Range over channel waits till channel is closed, which will never happen in that case.
Thanks! |
No description provided.