Skip to content
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

Merged
merged 3 commits into from Sep 21, 2016

Conversation

seletskiy
Copy link
Contributor

No description provided.

"time"
)

type HTTPTestStep struct {
Copy link
Owner

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")
Copy link
Owner

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",
Copy link
Owner

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(
Copy link
Owner

@kovetskiy kovetskiy Sep 20, 2016

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} {
Copy link
Owner

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Owner

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?

Copy link
Contributor Author

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.

@kovetskiy kovetskiy merged commit 151afcf into kovetskiy:master Sep 21, 2016
@kovetskiy
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants