ooni-probe-cli/internal/engine/experiment/dash/locate.go

21 lines
436 B
Go
Raw Normal View History

package dash
import (
"context"
"net/http"
"github.com/ooni/probe-cli/v3/internal/mlablocate"
"github.com/ooni/probe-cli/v3/internal/model"
)
type locateDeps interface {
HTTPClient() *http.Client
Logger() model.Logger
UserAgent() string
}
func locate(ctx context.Context, deps locateDeps) (mlablocate.Result, error) {
return mlablocate.NewClient(
deps.HTTPClient(), deps.Logger(), deps.UserAgent()).Query(ctx, "neubot")
}