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

Add reverse_mode GET param to trigger -R passed to iperf3 #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add reverse_mode GET param to trigger -R passed to iperf3 #10

wants to merge 3 commits into from

Conversation

cooperlees
Copy link

@cooperlees cooperlees commented Sep 20, 2020

This allows people to test downstream to the exporter host from the iperf server.

Test: docker build -t iperf3_exporter:cooper .

Attempts to fix #8

- Default to false (behavior today)

Test:
- See a compile / build succeed
- `docker build -t iperf3_exporter:cooper .`
Copy link
Author

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

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

Need some Gopher's help here ... I tried for a little while but couldn't get this to compile ...

if e.reverse{
iperfArgs = append(iperfArgs, "-R")
}
out, err := exec.CommandContext(ctx, iperfArgs...).Output()
Copy link
Author

Choose a reason for hiding this comment

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

I don't know how to "Go" pass the variable arguments:

# github.com/edgard/iperf3_exporter
./iperf3_exporter.go:120:33: not enough arguments in call to exec.CommandContext
	have (context.Context, []interface {}...)
	want (context.Context, string, ...string)

@cooperlees
Copy link
Author

Ok compiles now. We should be able to test.

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.

Support reverse mode
1 participant