refactor: only use shaping dialer for ndt7 and dash (#754)
See https://github.com/ooni/probe/issues/2112 for context. While there, run `go fix -fix buildtag ./...`
This commit is contained in:
parent
b68b8e1e8f
commit
6924d1ad81
17 changed files with 126 additions and 65 deletions
15
internal/netxlite/shaping.go
Normal file
15
internal/netxlite/shaping.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package netxlite
|
||||
|
||||
import "github.com/ooni/probe-cli/v3/internal/model"
|
||||
|
||||
// NewMaybeShapingDialer takes in input a model.Dialer and returns in output another
|
||||
// model.Dialer that MAY dial connections with I/O shaping, depending on whether
|
||||
// the user builds with or without the `-tags shaping` CLI flag.
|
||||
//
|
||||
// We typically use `-tags shaping` when running integration tests for dash and ndt7 to
|
||||
// avoiod hammering m-lab servers from the very-fast GitHub CI servers.
|
||||
//
|
||||
// See https://github.com/ooni/probe/issues/2112 for extra context.
|
||||
func NewMaybeShapingDialer(dialer model.Dialer) model.Dialer {
|
||||
return newMaybeShapingDialer(dialer)
|
||||
}
|
||||
Loading…
Reference in a new issue