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
|
|
@ -10,17 +10,16 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/webconnectivity"
|
||||
"github.com/ooni/probe-cli/v3/internal/measurexlite"
|
||||
"github.com/ooni/probe-cli/v3/internal/model"
|
||||
"github.com/ooni/probe-cli/v3/internal/netxlite"
|
||||
)
|
||||
|
||||
// ctrlTCPResult is the result of the TCP check performed by the test helper.
|
||||
type ctrlTCPResult = webconnectivity.ControlTCPConnectResult
|
||||
type ctrlTCPResult = model.THTCPConnectResult
|
||||
|
||||
// ctrlTLSResult is the result of the TLS check performed by the test helper.
|
||||
type ctrlTLSResult = webconnectivity.ControlTLSHandshakeResult
|
||||
type ctrlTLSResult = model.THTLSHandshakeResult
|
||||
|
||||
// tcpResultPair contains the endpoint and the corresponding result.
|
||||
type tcpResultPair struct {
|
||||
|
|
@ -73,7 +72,7 @@ func tcpDo(ctx context.Context, config *tcpConfig) {
|
|||
out := &tcpResultPair{
|
||||
Address: config.Address,
|
||||
Endpoint: config.Endpoint,
|
||||
TCP: webconnectivity.ControlTCPConnectResult{},
|
||||
TCP: model.THTCPConnectResult{},
|
||||
TLS: nil, // means: not measured
|
||||
}
|
||||
defer func() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue