Documentation
¶
Overview ¶
Package dnscheck contains the DNS check experiment.
See https://github.com/ooni/spec/blob/master/nettests/ts-028-dnscheck.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInputRequired = errors.New("this experiment needs input") ErrInvalidURL = errors.New("the input URL is invalid") ErrUnsupportedURLScheme = errors.New("unsupported URL scheme") )
The following errors may be returned by this experiment. Of course these errors are in addition to any other errors returned by the low level packages that are used by this experiment to implement its functionality.
Functions ¶
func Collect ¶
func Collect(ctx context.Context, multi urlgetter.Multi, inputs []urlgetter.MultiInput, callbacks model.ExperimentCallbacks) <-chan urlgetter.MultiOutput
Collect prints on the output channel the result of running dnscheck on every provided input. It closes the output channel when done.
func NewExperimentMeasurer ¶
func NewExperimentMeasurer(config Config) model.ExperimentMeasurer
NewExperimentMeasurer creates a new ExperimentMeasurer.
Types ¶
type Config ¶
type Config struct {
Domain string `ooni:"domain to resolve using the specified resolver"`
}
Config contains the experiment's configuration.
type Measurer ¶
type Measurer struct {
Config
}
Measurer performs the measurement.
func (Measurer) ExperimentName ¶
ExperimentName implements model.ExperimentSession.ExperimentName
func (Measurer) ExperimentVersion ¶
ExperimentVersion implements model.ExperimentSession.ExperimentVersion
func (Measurer) GetSummaryKeys ¶ added in v0.21.0
func (m Measurer) GetSummaryKeys(measurement *model.Measurement) (interface{}, error)
GetSummaryKeys implements model.ExperimentMeasurer.GetSummaryKeys.
func (Measurer) Run ¶
func (m Measurer) Run( ctx context.Context, sess model.ExperimentSession, measurement *model.Measurement, callbacks model.ExperimentCallbacks, ) error
Run implements model.ExperimentSession.Run
type SummaryKeys ¶ added in v0.21.0
type SummaryKeys struct {
IsAnomaly bool `json:"-"`
}
SummaryKeys contains summary keys for this experiment.
Note that this structure is part of the ABI contract with probe-cli therefore we should be careful when changing it.