refactor: move TH structs and definitions to model (#894)
This commit moves the TH structs and definitions to model. We don't want oohelperd to depend on web_connectivity@v0.4. Part of https://github.com/ooni/probe/issues/2240
This commit is contained in:
parent
110a11828b
commit
bb6563f363
12 changed files with 161 additions and 157 deletions
|
|
@ -9,7 +9,6 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/webconnectivity"
|
||||
"github.com/ooni/probe-cli/v3/internal/model"
|
||||
"github.com/ooni/probe-cli/v3/internal/netxlite"
|
||||
"github.com/ooni/probe-cli/v3/internal/tracex"
|
||||
|
|
@ -20,7 +19,7 @@ var newfailure = tracex.NewFailure
|
|||
|
||||
// ctrlDNSResult is the result of the DNS check performed by
|
||||
// the Web Connectivity test helper.
|
||||
type ctrlDNSResult = webconnectivity.ControlDNSResult
|
||||
type ctrlDNSResult = model.THDNSResult
|
||||
|
||||
// dnsConfig configures the DNS check.
|
||||
type dnsConfig struct {
|
||||
|
|
@ -70,7 +69,7 @@ func dnsMapFailure(failure *string) *string {
|
|||
case netxlite.FailureDNSNXDOMAINError:
|
||||
// We have a name for this string because dnsanalysis.go is
|
||||
// already checking for this specific error string.
|
||||
s := webconnectivity.DNSNameError
|
||||
s := model.THDNSNameError
|
||||
return &s
|
||||
case netxlite.FailureDNSNoAnswer:
|
||||
// In this case the legacy TH would produce an empty
|
||||
|
|
|
|||
Loading…
Reference in a new issue